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.
After Ctrl-V in editor I did "Undo", "Redo" ... and then colouring was broken. (See attachment) Build: NetBeans IDE Dev (Build 200808080201) VM: Java HotSpot(TM) Client VM, 1.5.0_11-b03, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_11-b03 OS: Windows XP, 5.1, x86 User comments: STACKTRACE: (first 10 lines) java.lang.IndexOutOfBoundsException: Index: 4, Size: 0 at org.netbeans.lib.editor.util.GapList.add(GapList.java:525) at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove.addRegion(TrailingWhitespaceRemove.java:181) at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove$AddRegionEdit.run(TrailingWhitespaceRemove.java:377) at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove$AddRegionEdit.redo(TrailingWhitespaceRemove.java:397) at org.netbeans.editor.BaseDocumentEvent.redo(BaseDocumentEvent.java:363) at org.netbeans.editor.GuardedDocumentEvent.redo(GuardedDocumentEvent.java:78) at javax.swing.undo.CompoundEdit.redo(CompoundEdit.java:59) at org.netbeans.editor.BaseDocument$AtomicCompoundEdit.redo(BaseDocument.java:2162) at javax.swing.undo.UndoManager.redoTo(UndoManager.java:222) at javax.swing.undo.UndoManager.redo(UndoManager.java:311)
Created attachment 68635 [details] Colouring broken
I guess there are no reliable steps how to reproduce this?
Broken colouring I had more than once in last weeks, but I can't remember the different causes.
Build: NetBeans IDE 6.5 Beta (Build 200808111757) VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b28 OS: Windows Server 2008, 6.0, x86 User Comments: Redo Stacktrace: java.lang.IndexOutOfBoundsException: Index: 1, Size: 0 at org.netbeans.lib.editor.util.GapList.add(GapList.java:525) at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove.addRegion(TrailingWhitespaceRemove.java:181) at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove$AddRegionEdit.run(TrailingWhitespaceRemove.java:377) at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove$AddRegionEdit.redo(TrailingWhitespaceRemove.java:397) at org.netbeans.editor.BaseDocumentEvent.redo(BaseDocumentEvent.java:363) at org.netbeans.editor.GuardedDocumentEvent.redo(GuardedDocumentEvent.java:78)
Created attachment 69545 [details] stacktrace
Build: NetBeans IDE 6.5 Beta (Build 200808111757) VM: Java HotSpot(TM) Client VM, 1.5.0_06-b05, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_06-b05 OS: SunOS, 5.10, x86 User Comments: Stacktrace: java.lang.IndexOutOfBoundsException: Index: 6, Size: 0 at org.netbeans.lib.editor.util.GapList.add(GapList.java:525) at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove.addRegion(TrailingWhitespaceRemove.java:181) at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove$AddRegionEdit.run(TrailingWhitespaceRemove.java:377) at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove$AddRegionEdit.redo(TrailingWhitespaceRemove.java:397) at org.netbeans.editor.BaseDocumentEvent.redo(BaseDocumentEvent.java:363) at org.netbeans.editor.GuardedDocumentEvent.redo(GuardedDocumentEvent.java:78)
Created attachment 69698 [details] stacktrace
This is the same cause like in issue 140446. *** This issue has been marked as a duplicate of 140446 ***
Seems that there is another problem - the issue #140446 is not happening any more (GapList.remove), but this (GapList.add) is still happening. See http://statistics.netbeans.org/analytics/detail.do?id=68340 - there are builds at the end of list of duplicates which are newer than Jul 23 more than 20 duplicates -> P2
I'll leave that to Mila. Something is still not quite right when undoing changes in the editor after saving a file. Jirko, do we know exact steps how to reproduce this? The steps would be very helpful. Thanks
Sorry, I cannot find any steps to reproduce.
Recomputation of index added for redo() so it should be fixed. http://hg.netbeans.org/main/rev/6511c9df8196
Integrated into 'main-golden', will be available in build *200810031107* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/6511c9df8196 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #145588 - IndexOutOfBoundsException: Index: 4, Size: 0