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 241129

Summary: javax.swing.text.BadLocationException: Invalid offset=-1 < 0; docLen=96423
Product: editor Reporter: aquaglia <aquaglia>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: NEW ---    
Severity: normal CC: aldobrucale, emiddio, FiruzzZ, FrantaM, gtzabari, javydreamercsw, Leperous, lolo_101, mkhramov, nairgh, nyabot, ramdaneoualitsen, scanti, stefan79, tdnorb
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 203421
Attachments: stacktrace
stacktrace
stacktrace
stacktrace
stacktrace

Description aquaglia 2014-01-29 16:25:26 UTC
Build: NetBeans IDE 8.0 Beta (Build 201401141042)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18
OS: Windows 7

User Comments:
GUEST: trying to edit the file, got a popup that it's locked, then tried to cancel background scanning of project

aquaglia: Java editing during debugging

GUEST: save file

GUEST: during control+Z

GUEST: Typing a line of code with a string concatenated by + in a java file




Stacktrace: 
javax.swing.text.BadLocationException: Invalid offset=-1 < 0; docLen=96423
   at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.checkOffsetNonNegative(EditorDocumentContent.java:270)
   at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.checkOffsetInContent(EditorDocumentContent.java:284)
   at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.createPosition(EditorDocumentContent.java:198)
   at javax.swing.text.AbstractDocument.createPosition(AbstractDocument.java:831)
   at org.netbeans.modules.editor.java.JavaBracesMatcher$1.run(JavaBracesMatcher.java:330)
   at org.netbeans.modules.editor.java.JavaBracesMatcher$1.run(JavaBracesMatcher.java:268)
Comment 1 aquaglia 2014-01-29 16:25:28 UTC
Created attachment 144550 [details]
stacktrace
Comment 2 stefan79 2014-02-04 14:49:16 UTC
Created attachment 144783 [details]
stacktrace

Exception occured while editing a Java-File.
Comment 3 Maksim Khramov 2014-04-23 14:41:47 UTC
Created attachment 146913 [details]
stacktrace

Editing java code
Comment 4 Exceptions Reporter 2014-07-23 15:22:30 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=203421
Comment 5 aldobrucale 2015-04-08 15:27:26 UTC
Created attachment 153097 [details]
stacktrace

noticed later
Comment 6 javydreamercsw 2016-05-05 13:42:14 UTC
Created attachment 159556 [details]
stacktrace

Hard to tell when it happened.