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 56315

Summary: BadLocationException: Invalid offset=214920 not within <0, 1>
Product: web Reporter: Marian Mirilovic <mmirilovic>
Component: HTML EditorAssignee: Marek Fukala <mfukala>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Marian Mirilovic 2005-03-12 09:10:42 UTC
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)
Comment 1 Marek Fukala 2005-03-14 14:58:58 UTC
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.
Comment 2 Marek Fukala 2005-03-17 14:15:17 UTC
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
Comment 3 Marian Mirilovic 2005-03-19 09:10:37 UTC
verified in NB4.1 (200503172015)