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 40351 - [36cat] IndexOutOfBoundsException in LineRootElement
Summary: [36cat] IndexOutOfBoundsException in LineRootElement
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords: RANDOM
: 40253 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-22 17:00 UTC by David Strupl
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Strupl 2004-02-22 17:00:03 UTC
[ JDK VERSION : J2SE 1.4.2 ]

NB 3.6 Beta 1 build on JDK 1.4.2 on Linux RH7.3, KDE.
After deleting couple of lines and continued editing:

java.lang.IndexOutOfBoundsException: Invalid line index=299 >= lineCount=299
	at org.netbeans.editor.LineRootElement.getElement(LineRootElement.java:54)
	at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:631)
	at org.netbeans.editor.BaseDocument.render(BaseDocument.java:883)
	at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:609)
	at org.openide.text.NbDocument.findLineOffset(NbDocument.java:142)
	at org.openide.text.DocumentLine$Set.getCurrent(DocumentLine.java:904)
	at org.netbeans.modules.java.ParserAnnotation.attachToLineSet(ParserAnnotation.java:133)
	at org.netbeans.modules.java.JavaEditor$5.run(JavaEditor.java:653)
	at org.netbeans.editor.BaseDocument.render(BaseDocument.java:883)
	at org.netbeans.modules.java.JavaEditor.processAnnotations(JavaEditor.java:659)
	at org.netbeans.modules.java.JavaEditor.access$300(JavaEditor.java:75)
[catch] at org.netbeans.modules.java.JavaEditor$2.run(JavaEditor.java:346)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Comment 1 Miloslav Metelka 2004-02-23 09:31:56 UTC
JavaEditor tries to attach the annotation to non-existent line. This
needs to be fixed in the java module.
Comment 2 Jan Pokorsky 2004-02-25 16:39:26 UTC
Cau Davide, it seems you deleted lines before the annotation was
attached. It is bug in timing. I'll look at it.
Comment 3 David Strupl 2004-02-25 16:46:06 UTC
Cau, as I said I have deleted couple of lines with imports and if I
remember correctly pasted one line with import if it matters.
Comment 4 Jan Pokorsky 2004-02-26 23:33:34 UTC
fixed in

/cvs/java/src/org/netbeans/modules/java/JavaEditor.java,v1.153
/cvs/java/src/org/netbeans/modules/java/ParserAnnotation.java,v1.6
Comment 5 Jan Pokorsky 2004-03-03 14:12:02 UTC
*** Issue 40253 has been marked as a duplicate of this issue. ***
Comment 6 Jiri Prox 2005-07-14 11:18:57 UTC
verified