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 271306

Summary: javax.swing.text.BadLocationException: Invalid offset=10 > (docLen+1)=8
Product: editor Reporter: Exceptions Reporter <exceptions_reporter>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 230054
Attachments: stacktrace

Description Exceptions Reporter 2017-08-16 11:32:21 UTC
This bug was originally marked as duplicate of bug 245776, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 8.2 (Build 201705191307)
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:
GUEST: .




Stacktrace: 
javax.swing.text.BadLocationException: Invalid offset=10 > (docLen+1)=8
   at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.checkOffsetInContent(EditorDocumentContent.java:287)
   at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.createPosition(EditorDocumentContent.java:198)
   at javax.swing.text.AbstractDocument.createPosition(AbstractDocument.java:829)
   at org.netbeans.modules.editor.indent.TaskHandler.setCaretOffset(TaskHandler.java:129)
   at org.netbeans.modules.editor.indent.IndentImpl.reindent(IndentImpl.java:259)
   at org.netbeans.modules.editor.indent.api.Indent.reindent(Indent.java:171)
Comment 1 Exceptions Reporter 2017-08-16 11:32:23 UTC
Created attachment 164959 [details]
stacktrace