|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
[Issue 447] New - ThreadProxyEventList.clear() failshttps://glazedlists.dev.java.net/issues/show_bug.cgi?id=447
Issue #|447 Summary|ThreadProxyEventList.clear() fails Component|glazedlists Version|1.7.0 Platform|All OS/Version|All URL| Status|NEW Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|core Assigned to|jessewilson Reported by|brands ------- Additional comments from brands@... Sun Jun 8 11:53:23 +0000 2008 ------- see for example testcase EventTableViewerTest.guiTestClearOnThreadProxy_FixMe() stacktrace of failing test: java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at ca.odell.glazedlists.GuiTestCase$ExecuteGuiTestsRunnable.run(GuiTestCase.java:116) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:152) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4097) at ca.odell.glazedlists.swt.SwtTestCase.executeOnGUIThread(SwtTestCase.java:40) at ca.odell.glazedlists.GuiTestCase.testGui(GuiTestCase.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.remove(ArrayList.java:387) at ca.odell.glazedlists.BasicEventList.remove(BasicEventList.java:172) at ca.odell.glazedlists.TransformedList.remove(TransformedList.java:111) at ca.odell.glazedlists.impl.SimpleIterator.remove(SimpleIterator.java:62) at ca.odell.glazedlists.AbstractEventList.clear(AbstractEventList.java:424) at ca.odell.glazedlists.TransformedList.clear(TransformedList.java:95) at ca.odell.glazedlists.swt.EventTableViewerTest.guiTestClearOnThreadProxy_FixMe(EventTableViewerTest.java:389) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at ca.odell.glazedlists.GuiTestCase$ExecuteGuiTestsRunnable.run(GuiTestCase.java:112) ... 22 more --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@... For additional commands, e-mail: issues-help@... |
|
|
[Issue 447] ThreadProxyEventList.clear() failshttps://glazedlists.dev.java.net/issues/show_bug.cgi?id=447
------- Additional comments from brands@... Sun Jun 8 13:31:18 +0000 2008 ------- *** Issue 374 has been marked as a duplicate of this issue. *** --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@... For additional commands, e-mail: issues-help@... |
|
|
[Issue 447] ThreadProxyEventList.clear() failshttps://glazedlists.dev.java.net/issues/show_bug.cgi?id=447
------- Additional comments from brands@... Sun Jun 8 13:33:37 +0000 2008 ------- Reported problems: http://www.nabble.com/clear%28%29-throws-IndexOutOfBoundsException-from-SwingThreadProxyEventList-to4895197.html#a4896931 http://www.nabble.com/Remove-all-items-from-EventTableViewer-to16732688.html#a16732688 --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@... For additional commands, e-mail: issues-help@... |
|
|
[Issue 447] ThreadProxyEventList.clear() failshttps://glazedlists.dev.java.net/issues/show_bug.cgi?id=447
------- Additional comments from brands@... Sun Jun 8 13:43:40 +0000 2008 ------- Calling clear() on ThreadProxyList calls TransformedList.clear() : public void clear() { // nest changes and let the other methods compose the event updates.beginEvent(true); try { super.clear(); // AbstractEventList.clear() } finally { updates.commitEvent(); } } AbstractEventList.clear() uses SimpleIterator to remove the list elements one by one. SimpleIterator uses source.size() to implement hasNext() method. But ThreadProxylist.size() returns the size of the local cache, which is only updated after commitEvent. So SimpleIterator sees the old wrong list size and iterates "too far"... --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@... For additional commands, e-mail: issues-help@... |
|
|
[Issue 447] ThreadProxyEventList.clear() failshttps://glazedlists.dev.java.net/issues/show_bug.cgi?id=447
User jessewilson changed the following: What |Old value |New value ================================================================================ Status|NEW |RESOLVED -------------------------------------------------------------------------------- Resolution| |FIXED -------------------------------------------------------------------------------- ------- Additional comments from jessewilson@... Thu Jun 12 08:12:34 +0000 2008 ------- James came through town and convinced me to fix this! We ended up making ThreadProxyEventList apply changes to its own cache more eagerly. --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@... For additional commands, e-mail: issues-help@... |
| Free Forum Powered by Nabble | Forum Help |