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 242191 - javax.swing.text.BadLocationException: Invalid offset=-1 < 0; docLen=23940
Summary: javax.swing.text.BadLocationException: Invalid offset=-1 < 0; docLen=23940
Status: RESOLVED INCOMPLETE
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0
Hardware: All All
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-21 12:37 UTC by Michel Graciano
Modified: 2016-07-14 01:52 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 207856


Attachments
stacktrace (1.67 KB, text/plain)
2014-02-21 12:37 UTC, Michel Graciano
Details
Sample project (3.50 KB, application/zip)
2014-02-21 12:43 UTC, Michel Graciano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2014-02-21 12:37:55 UTC
This bug was originally marked as duplicate of bug 203591, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 20140219-77164cd1c6f6)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.0-b56, Java(TM) SE Runtime Environment, 1.7.0_40-b43
OS: Linux

User Comments:
hmichel: Opening a file (Lombok active)




Stacktrace: 
javax.swing.text.BadLocationException: Invalid offset=-1 < 0; docLen=23940
   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 org.netbeans.editor.BaseDocument.createPosition(BaseDocument.java:1365)
   at org.openide.text.NbDocument.createPosition(NbDocument.java:225)
   at org.netbeans.modules.java.hints.infrastructure.ErrorHintsProvider$1.run(ErrorHintsProvider.java:556)
Comment 1 Michel Graciano 2014-02-21 12:37:57 UTC
Created attachment 145466 [details]
stacktrace
Comment 2 Michel Graciano 2014-02-21 12:43:18 UTC
Created attachment 145467 [details]
Sample project

Open file Class1 and the error will show up.
Comment 3 Exceptions Reporter 2015-05-15 06:17:49 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=207856
Comment 4 Exceptions Reporter 2016-01-18 00:36:39 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=207856
Comment 5 Svata Dedic 2016-06-20 08:21:49 UTC
More info needed. I've added diagnostic (jet-main#6689a026a2fd) to the dev version, source text, and position info should be logged prior to exception and attached by exception reporter.
Comment 6 Quality Engineering 2016-07-14 01:52:13 UTC
Integrated into 'main-silver', will be available in build *201607140002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6689a026a2fd
User: Svata Dedic <sdedic@netbeans.org>
Log: #242191: diagnostic added