Exception in thread
Hi people,
When running a file searching program that i have created i get a
"Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1193" error. Problem is JAVA doesnt seem to know where the problem is coming from as the stack trace shows ((Unknown Source). The 1193 in the above example changes when running the program. I am using a JList that updates with the names of files found matching the search criteria.
For a search on my D drive of files containting the phrase "mp3" i first get the error above and the JList shows no entires, however when a second search is done without closing the program it not only updates the JList correctly, but throws out another 3 "ArrayIndexOutOfBoundsException" errors.
Sometimes the JList fills, and then empties instantly, flashing all the file names for a frame before clearing them again. Clicking search a few times eventually shows the file names without the flashing however i really doubt this is an error of my doing.
Is this a bug with java JLists, as the errors are always thrown from java classes, for example:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 14765
at javax.swing.plaf.basic.BasicListUI.updateLayoutState(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.JList.getScrollableTracksViewportWidth(Unknown Source)
at javax.swing.ScrollPaneLayout.layoutContainer(Unknown Source)
at java.awt.Container.layout(Unknown Source)
at java.awt.Container.doLayout(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validate(Unknown Source)
at javax.swing.RepaintManager.validateInvalidComponents(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I would post code however the program is very large and i dont know why or where the error is being thrown.
Any help would be appreciated, thanks for reading :P

