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 271795 - javax.swing.text.BadLocationException: offset=4322 > doc.getLength()=4314
Summary: javax.swing.text.BadLocationException: offset=4322 > doc.getLength()=4314
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-13 03:34 UTC by mahmuddinnf
Modified: 2017-11-13 03:34 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 226685


Attachments
stacktrace (2.11 KB, text/plain)
2017-11-13 03:34 UTC, mahmuddinnf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mahmuddinnf 2017-11-13 03:34:40 UTC
Build: NetBeans IDE 8.2 (Build 201609300101)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.144-b01, Java(TM) SE Runtime Environment, 1.8.0_144-b01
OS: Windows 10

User Comments:
thilina01: editing some html files including angularjs codes

GUEST: ...

GUEST: durring code format

GUEST: .........

GUEST: what its this bug

GUEST: In order to work on a Spring Boot project, i ve installed a Thymeleaf code completion plugin. It seems when i am (shift+alt+f) re-identating the HTML code this exception happens.
Identation however does work after maybe a couple of tries.

GUEST: theres again error

GUEST: <Please provide a description of the problem or the steps to reproduce>ok

GUEST: bug

GUEST: --

GUEST: javax.swing.text.BadLocationException: offset=30835 > doc.getLength()=30815

GUEST: ?

GUEST: ?

GUEST: I tried to enter double opening braces ( {{ ) in a Mustache.js HTML template. This was done inside the scope of a <script type="text/html"></script> tag.

GUEST: Please provide a description of the problem or the steps to reproduce

GUEST: ctrl+shift+f

mahmuddinnf: Error occured when split 2 view, and then format text (Alt + Shift + F)

GUEST: ??????

GUEST: <Please provide a description of the problem or the steps to reproduce

GUEST: CTRL+S

GUEST: If i press Alt+Shift+F It doesn't work Format coading

GUEST: Please provide a description of the problem or the steps to reproduce

GUEST: Long HTML file results in this error.

GUEST: working with html

GUEST: i




Stacktrace: 
javax.swing.text.BadLocationException: offset=4322 > doc.getLength()=4314
   at org.netbeans.modules.editor.indent.IndentImpl.checkOffsetInDocument(IndentImpl.java:398)
   at org.netbeans.modules.editor.indent.spi.Context.modifyIndent(Context.java:174)
   at org.netbeans.modules.web.indent.api.support.AbstractIndenter.modifyDocument(AbstractIndenter.java:1865)
   at org.netbeans.modules.web.indent.api.support.AbstractIndenter.applyIndents0(AbstractIndenter.java:1723)
   at org.netbeans.modules.web.indent.api.support.AbstractIndenter.access$2500(AbstractIndenter.java:82)
   at org.netbeans.modules.web.indent.api.support.AbstractIndenter$3.run(AbstractIndenter.java:1618)
Comment 1 mahmuddinnf 2017-11-13 03:34:44 UTC
Created attachment 165437 [details]
stacktrace