[Issue 472] New - IndexOutOfBoundsException in ThreadProxyEventList

View: New views
4 Messages — Rating Filter:   Alert me  

[Issue 472] New - IndexOutOfBoundsException in ThreadProxyEventList

by cbare-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://glazedlists.dev.java.net/issues/show_bug.cgi?id=472
                 Issue #|472
                 Summary|IndexOutOfBoundsException in ThreadProxyEventList
               Component|glazedlists
                 Version|current
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|swing
             Assigned to|jessewilson
             Reported by|cbare






------- Additional comments from cbare@... Tue Mar 24 18:14:28 +0000 2009 -------
Here's a tasty concurrency bug.

I get an IndexOutOfBoundsException from ThreadProxyEventList when a filtered list is displayed in a
JList via EventListModel. When the filter criteria changes and there are fewer items in the list, the
previously selected index may be greater than the number of items now in the list. If you then call
getSelectedValue() on the JList, it asks the underlying list for an index that doesn't exist and you get the
exception. I'm not doing any locking myself under the assumption that EventListModel is supposed to
be doing that behind the scenes.

Possibly related to: <a href="https://glazedlists.dev.java.net/servlets/ReadMsg?
listName=dev&msgNo=1066">IndexOutOfBoundsException in ThreadProxyEventList</a>

Verified to happen on Mac OSX and WinXP.

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 472] IndexOutOfBoundsException in ThreadProxyEventList

by cbare-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://glazedlists.dev.java.net/issues/show_bug.cgi?id=472






------- Additional comments from cbare@... Tue Mar 24 18:17:02 +0000 2009 -------
Created an attachment (id=45)
Reproduce IndexOutOfBoundsException


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 472] IndexOutOfBoundsException in ThreadProxyEventList

by jplemieux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://glazedlists.dev.java.net/issues/show_bug.cgi?id=472



User jplemieux changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
              Resolution|                          |WONTFIX
--------------------------------------------------------------------------------




------- Additional comments from jplemieux@... Tue Mar 24 19:47:06 +0000 2009 -------
Please use an EventSelectionModel. Interaction between GL models and normal
Swing models isn't always elegant because of eccentricities in controller code.

Specifically, this code will fix your exception:

listBox.setSelectionModel(new EventSelectionModel<String>(filteredFruits));

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 472] IndexOutOfBoundsException in ThreadProxyEventList

by cbare-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://glazedlists.dev.java.net/issues/show_bug.cgi?id=472






------- Additional comments from cbare@... Thu Mar 26 17:11:26 +0000 2009 -------
Oops, my bad. I verified that using EventSelectionModel works as expected (on OS X and Windows).
Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...