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 40272 - error loading old saved projects
Summary: error loading old saved projects
Status: RESOLVED DUPLICATE of bug 33165
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-19 12:33 UTC by oschirr
Modified: 2007-11-05 13:44 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 oschirr 2004-02-19 12:33:41 UTC
I have created several projects with a gui with 
several textfields and own beans. When I start 
NetBeans and open the project again I often get 
the following error: 
Annotation: Exception occurred in Request 
Processor 
java.lang.IndexOutOfBoundsException: Invalid 
line index=1667 >= lineCount=1214 
	at 
org.netbeans.editor.LineRootElement.getElement(LineRootElement.java:54) 
	at 
org.openide.text.NbDocument.findLineOffset(NbDocument.java:124) 
	at 
org.openide.text.PositionRef$Manager$LineKind.toMemory(PositionRef.java:673) 
	at 
org.openide.text.PositionRef$Manager.processPositions(PositionRef.java:281) 
	at 
org.openide.text.PositionRef$Manager.documentOpened(PositionRef.java:248) 
	at 
org.openide.text.CloneableEditorSupport$Listener.run(CloneableEditorSupport.java:1635) 
	at 
org.openide.util.Task.run(Task.java:136) 
	at 
org.openide.text.CloneableEditorSupport$1.run(CloneableEditorSupport.java:348) 
	at 
org.openide.util.Task.run(Task.java:136) 
	at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328) 
[catch] at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:670) 
 
I always get the same error and the same line 
index (1667) in all different project. The 
projects seems to be loaded correctly but I'm 
then not able to save any changes. I am able to 
load the project without error when I change the 
gui.java 
(enter a newline for example) file with an 
external text editor and start NetBeans again. 
This procedure doesn't always work. I have to 
repeat this several times and enter the newline 
in different places. 
 
I didn't change/move the jar-files that contain 
my beans. 
 
Any ideas? 
 
Oliver
Comment 1 Milan Kubec 2004-02-25 08:00:18 UTC
Please evaluate.
Comment 2 Miloslav Metelka 2004-02-25 13:27:54 UTC
There likely used to be an annotation e.g. a breakpoint or some other
sort of reason why it tries to recreate a o.o.t.Line for the 1667 line
index.
 If you want to get rid of the problem in that particular java file (I
assume that it happens once you open certain java source file) you
would either have to insert the empty lines at the end of that file so
that the line 1668 (1667 + 1) is there and then remove the annotation
on the line 1668. Or if it would be a breakpoint you could likely
remove it through the debugger window (menu
Window->Windows->Debugging->Debugger Window) under "Breakpoints" node
in the treeview.

Anyway this issue should now be fixed by complex fix for the issue
33165 which is already integrated and it will be present in 3.6.

*** This issue has been marked as a duplicate of 33165 ***