This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[200408081800] The first occurence of test failure is probably for build [2004080200].
Created attachment 16702 [details] test log
This test contains no threading and works on my jdk1.4.2-b28 I need more information about your VMs I am affraid.
Still I added invokeAndWait, but this is likely not any fix. openide/test/unit/src/org/openide/text/UndoRedoTest.java,v <-- UndoRedoTest.java new revision: 1.3
BTW on yesterday Monday morning I have integrated some editor document-related fixes that could possibly affect undo but I have manually tested them and they worked fine and as Petr said the first occurrence of the test failure was likely on 08/02 which was prior to my integration. Anyway I'll recheck them again.
UndoRedoTest is pure unit test. You would need to do changes in openide.
the test fails again on Windows XP and Windows 2000.
Created attachment 16747 [details] exception stacktrace
I've added new assert. openide/test/unit/src/org/openide/text/UndoRedoTest.java,v <-- UndoRedoTest.java new revision: 1.4
The tests fails again on Win2k and Win XP.
Created attachment 16904 [details] test log
Guys, I guess I have investigated the problem. It is in the fact that one can get access to a document (using openDocument) sooner then a UndoableListener is attached to it. I have no idea why, it is that way, so your review would be welcomed. I am going to attach the change in the CES (including debugging messages that made me realize that notify1 is called sooner than add1).
Created attachment 17059 [details] Moving addUndo*Listener before any notifyAll
cvs -q ci -m "#47022: Fixing race condition observed by UndoRedoTest on windows" Checking in src/org/openide/text/CloneableEditorSupport.java; /cvs/openide/src/org/openide/text/CloneableEditorSupport.java,v <-- CloneableEditorSupport.java new revision: 1.132;
So it is fixed.
v