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 245592 - IndexOutOfBoundsException: Invalid line index=555 >= lineCount=89
Summary: IndexOutOfBoundsException: Invalid line index=555 >= lineCount=89
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-11 15:16 UTC by alied
Modified: 2014-07-17 02:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 210655


Attachments
stacktrace (1.77 KB, text/plain)
2014-07-11 15:16 UTC, alied
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alied 2014-07-11 15:16:34 UTC
This issue was reported manually by sdedic.
It already has 2 duplicates 


Build: NetBeans IDE 8.0 (Build 201403101706)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.5-b02, Java(TM) SE Runtime Environment, 1.8.0_05-b13
OS: Windows 7

User Comments:
alied: pasted a stack trace and then double clicked on a line of my project

alexvsimon: go to ftom "Analyze Stack Window"




Stacktrace: 
java.lang.IndexOutOfBoundsException: Invalid line index=555 >= lineCount=89
   at org.netbeans.modules.editor.lib2.document.LineRootElement.getElement(LineRootElement.java:84)
   at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:923)
   at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1391)
   at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:898)
   at org.openide.text.NbDocument.findLineOffset(NbDocument.java:201)
   at org.openide.text.DocumentLine$Set.offset(DocumentLine.java:1065)
Comment 1 alied 2014-07-11 15:16:36 UTC
Created attachment 147998 [details]
stacktrace
Comment 2 Svata Dedic 2014-07-11 15:17:46 UTC
The stacktrace analyzer should gracefully handle the IOOBE - e.g. print a notice that the correct line could not be found to the status line.
Comment 3 Svata Dedic 2014-07-11 15:51:12 UTC
Fixed in jet-main#bb43f981c8c5
Comment 4 Quality Engineering 2014-07-17 02:18:09 UTC
Integrated into 'main-silver', will be available in build *201407170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/bb43f981c8c5
User: Svata Dedic <sdedic@netbeans.org>
Log: #245592: reported if the stacktrace line points outside of the document contents