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

[2694 byte] By [moggaa] at [2007-10-3 8:28:38]
# 1

I'm having the same issue. Also with a JList. Sometimes the requested data shows and sometimes it flickers and disappears. Same error message as well. If you figure this out I would really appreciate hearing the solution! I'm stumped right now.

Everything is working fine for me in Linux (Redhat) and Windows 2k. I'm only seeing this problem in Windows XP. (We're running JDK 1.4.2, old I know but we're stuck with it for now.)

Tandainaa at 2007-7-15 3:35:23 > top of Java-index,Archived Forums,Debugging Tools and Techniques...