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.
NB4.1 (200503112215) , JDK1.5.0_02 (fcs) Sometimes when I close an HTML file in editor I get next exception: javax.swing.text.BadLocationException: Invalid offset=214920 not within <0, 1> at org.netbeans.editor.Utilities.checkOffsetValid(Utilities.java:1227) at org.netbeans.editor.Utilities.getLineOffset(Utilities.java:552) at org.netbeans.modules.html.editor.folding.HTMLFoldManager.addFold(HTMLFoldManager.java:313) [catch] at org.netbeans.modules.html.editor.folding.HTMLFoldManager.updateFolds(HTMLFoldManager.java:193) at org.netbeans.modules.html.editor.folding.HTMLFoldManager.access$000(HTMLFoldManager.java:62) at org.netbeans.modules.html.editor.folding.HTMLFoldManager$1.run(HTMLFoldManager.java:112) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462)
Can you please try a latest build? I have fixed two issues related to closing JSP files on last Friday (March 11th). The problem is very similar to a fixed Issue #56166.
fixed - no BadLocationException is thrown when document is closing. Checking in JspFoldManager.java; /cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/folding/JspFoldManager.java,v <-- JspFoldManager.java new revision: 1.26; previous revision: 1.25 done Checking in HTMLFoldManager.java; /cvs/html/editor/src/org/netbeans/modules/html/editor/folding/HTMLFoldManager.java,v <-- HTMLFoldManager.java new revision: 1.13; previous revision: 1.12 done
verified in NB4.1 (200503172015)