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 225820

Summary: IndexOutOfBoundsException: Invalid line index=1 >= lineCount=1
Product: editor Reporter: minoleg <minoleg>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: NEW ---    
Severity: normal CC: alopez, dmain, hallyhaa, herish_sharma, mziernik, parekhdipen, rad, rburkhead, rodrigorsantos, shinichi0313, stvakis, terje7601
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 198303
Attachments: stacktrace
stacktrace

Description minoleg 2013-02-06 23:29:04 UTC
Build: NetBeans IDE 7.3 RC1 (Build 201301240957)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_13-b20
OS: Windows 7

User Comments:
rburkhead: Compiling a single file. The file contents were not saved when I hit the compile menu item, but were saved by the compile action (at least the indicator on the tab suggested it was).

rburkhead: Cutting and pasting methods from one class to another.

hallyhaa: CTRL-X to cut out a portion of HTML from an HTML file.




Stacktrace: 
java.lang.IndexOutOfBoundsException: Invalid line index=1 >= lineCount=1
   at org.netbeans.modules.editor.lib2.document.LineRootElement.getElement(LineRootElement.java:84)
   at org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.updateLineEndOffset(HighlightsViewFactory.java:301)
   at org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.createView(HighlightsViewFactory.java:202)
   at org.netbeans.modules.editor.lib2.view.ViewBuilder.createNextView(ViewBuilder.java:898)
   at org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:735)
   at org.netbeans.modules.editor.lib2.view.ViewBuilder.createReplaceRepaintViews(ViewBuilder.java:689)
Comment 1 minoleg 2013-02-06 23:29:06 UTC
Created attachment 131081 [details]
stacktrace
Comment 2 Exceptions Reporter 2013-02-07 13:13:30 UTC
Created attachment 131093 [details]
stacktrace
Comment 3 Exceptions Reporter 2013-02-11 22:01:45 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=198303
Comment 4 Miloslav Metelka 2013-08-27 09:53:20 UTC
Unfortunately even after issue #225451 was fixed apparently the IOOBE may still happen.