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.

Bug 140446 - [65cat] IndexOutOfBoundsException: remove(): Index: 0, Size: 0
Summary: [65cat] IndexOutOfBoundsException: remove(): Index: 0, Size: 0
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Jancura
URL: http://statistics.netbeans.org/except...
Keywords:
: 140993 141354 141390 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-17 07:07 UTC by Torbjorn Norbye
Modified: 2008-09-12 11:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 68340


Attachments
stacktrace (3.95 KB, text/plain)
2008-07-18 10:15 UTC, kozmoz
Details
stacktrace (4.04 KB, text/plain)
2008-07-18 17:30 UTC, Petr Dvorak
Details
stacktrace (4.23 KB, text/plain)
2008-07-18 18:34 UTC, Michel Graciano
Details
stacktrace (4.25 KB, text/plain)
2008-07-19 17:47 UTC, karmagfa
Details
stacktrace (4.52 KB, text/plain)
2008-07-21 14:31 UTC, _ theanuradha
Details
stacktrace (4.25 KB, text/plain)
2008-07-22 12:06 UTC, jlaskowski
Details
stacktrace (4.04 KB, text/plain)
2008-07-22 21:37 UTC, chronosmark
Details
stacktrace (4.25 KB, text/plain)
2008-07-23 13:57 UTC, _ theanuradha
Details
stacktrace (4.25 KB, text/plain)
2008-07-23 14:48 UTC, Marian Mirilovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjorn Norbye 2008-07-17 07:07:41 UTC
Undo (at least from the keyboard) appears to be broken!

Build: NetBeans IDE Dev (Build 200806211203)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05, Java(TM) SE Runtime Environment, 1.6.0_03-b05
OS: Linux, 2.6.25.6-27.fc8, i386
User comments: 
STACKTRACE: (first 10 lines)
java.lang.IndexOutOfBoundsException: remove(): Index: 0, Size: 0
        at org.netbeans.lib.editor.util.GapList.remove(GapList.java:633)
        at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove.removeRegion(TrailingWhitespaceRemove.java:183)
        at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove$AddRegionEdit.undo(TrailingWhitespaceRemove.java:373)
        at org.netbeans.editor.BaseDocumentEvent.undo(BaseDocumentEvent.java:303)
        at org.netbeans.editor.GuardedDocumentEvent.undo(GuardedDocumentEvent.java:69)
        at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46)
        at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46)
        at org.netbeans.modules.xml.xam.AbstractModel$ModelUndoableEdit.undo(AbstractModel.java:594)
        at org.netbeans.modules.bpel.model.impl.BpelModelImpl$BpelModelUndoableEdit.undo(BpelModelImpl.java:822)
        at org.openide.text.CloneableEditorSupport$FilterUndoableEdit.undo(CloneableEditorSupport.java:2684)
Comment 1 Vitezslav Stejskal 2008-07-17 12:21:04 UTC
How can I reproduce it please? I tried editing .bpel file from Synchronous Sample project, but without luck. Thanks
Comment 2 Exceptions Reporter 2008-07-17 15:22:04 UTC
This issue has already 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=68340
Comment 3 kozmoz 2008-07-18 10:15:08 UTC
Build: NetBeans IDE Dev (Build 200807170007)
VM: Java HotSpot(TM) Client VM, 1.5.0_13-121, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_13-b05-241
OS: Mac OS X, 10.4.11, i386

User Comments: 
Comment 4 kozmoz 2008-07-18 10:15:17 UTC
Created attachment 64937 [details]
stacktrace
Comment 5 Petr Dvorak 2008-07-18 17:30:06 UTC
Build: NetBeans IDE Dev (Build 200807170007)
VM: Java HotSpot(TM) Client VM, 10.0-b24, Java(TM) SE Runtime Environment, 1.6.0_07-rev-b07
OS: Linux, 2.6.24-19-generic, i386

User Comments: 
I pasted a starting editor fold (reproducing issue 129672) and after I pasted it, I called Undo...
Comment 6 Petr Dvorak 2008-07-18 17:30:15 UTC
Created attachment 64978 [details]
stacktrace
Comment 7 Petr Dvorak 2008-07-18 17:44:12 UTC
Product Version: NetBeans IDE Dev (Build 200807170007)
Java: 1.6.0_07-rev; Java HotSpot(TM) Client VM 10.0-b24
System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb)

I think I can reproduce it - how much will you give;)? No, just kidding... it is easy one...

1. Start IDE with a clean userdir
2. Create a new Java Application with a main class
3. Select some text in the main.java file
4. Copy the selection (Ctrl+C)
5. Press backspace (delete the selection)
6. Paste the selection (Ctrl+V) - text is in the same state as before step 5
7. Press Ctrl+Z (undo)
-> IOBE
Comment 8 Michel Graciano 2008-07-18 18:34:30 UTC
Build: NetBeans IDE Dev (Build 200807170007)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Linux, 2.6.24-19-generic, i386

User Comments: 
During a Ctrl + Z...
Comment 9 Michel Graciano 2008-07-18 18:34:37 UTC
Created attachment 64984 [details]
stacktrace
Comment 10 Exceptions Reporter 2008-07-19 14:14:20 UTC
This issue has already 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=68340
Comment 11 karmagfa 2008-07-19 17:47:42 UTC
Build: NetBeans IDE Dev (Build 200807170007)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Windows XP, 5.1, x86

User Comments: 
I pressed undo in the editor while writing some java code.
Comment 12 karmagfa 2008-07-19 17:47:46 UTC
Created attachment 65035 [details]
stacktrace
Comment 13 _ theanuradha 2008-07-21 14:31:10 UTC
Build: NetBeans IDE Dev (Build 080719)
VM: Java HotSpot(TM) Client VM, 11.0-b14, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b27
OS: Windows XP, 5.1, x86

User Comments: 
I edit xml and hit Ctrl+Z 
Comment 14 _ theanuradha 2008-07-21 14:31:28 UTC
Created attachment 65130 [details]
stacktrace
Comment 15 Jan Becicka 2008-07-21 16:20:01 UTC
*** Issue 140993 has been marked as a duplicate of this issue. ***
Comment 16 Vitezslav Stejskal 2008-07-22 11:56:58 UTC
Also see issue #140488.
Comment 17 jlaskowski 2008-07-22 12:06:05 UTC
Build: NetBeans IDE Dev (Build 200807170007)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Windows XP, 5.1, x86

User Comments: 
Comment 18 jlaskowski 2008-07-22 12:06:37 UTC
Created attachment 65220 [details]
stacktrace
Comment 19 chronosmark 2008-07-22 21:36:57 UTC
Build: NetBeans IDE Dev (Build 200807170007)
VM: Java HotSpot(TM) Client VM, 1.6.0-b105, Java(TM) SE Runtime Environment, 1.6.0-b105
OS: Windows XP, 5.1, x86

User Comments: 
When trying to undo a paste of code into a file. 
Comment 20 chronosmark 2008-07-22 21:37:04 UTC
Created attachment 65278 [details]
stacktrace
Comment 21 _ theanuradha 2008-07-23 13:57:24 UTC
Build: NetBeans IDE Dev (Build 080723)
VM: Java HotSpot(TM) Client VM, 11.0-b14, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b27
OS: Windows XP, 5.1, x86

User Comments: 
Comment 22 _ theanuradha 2008-07-23 13:57:27 UTC
Created attachment 65375 [details]
stacktrace
Comment 23 Marian Mirilovic 2008-07-23 14:48:30 UTC
Build: NetBeans IDE Dev (Build 200807230806)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.0-b13, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b26
OS: Linux, 2.6.24-19-generic, amd64

User Comments: 
Edited xml file and Copy/Paste one line, push Ctrl+Z .... exception rises
Comment 24 Marian Mirilovic 2008-07-23 14:48:39 UTC
Created attachment 65385 [details]
stacktrace
Comment 25 Jan Jancura 2008-07-23 16:18:37 UTC
fixed in b9fee126ff05
Comment 26 Jan Becicka 2008-07-24 07:43:39 UTC
*** Issue 141390 has been marked as a duplicate of this issue. ***
Comment 27 _ theanuradha 2008-07-28 17:53:37 UTC
*** Issue 141354 has been marked as a duplicate of this issue. ***
Comment 28 Miloslav Metelka 2008-09-12 11:21:46 UTC
*** Issue 145588 has been marked as a duplicate of this issue. ***