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 219409 - javax.swing.text.BadLocationException: Invalid offset=6784 > (docLen+1)=6743
Summary: javax.swing.text.BadLocationException: Invalid offset=6784 > (docLen+1)=6743
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 224394 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-02 23:08 UTC by mago_ebon
Modified: 2013-01-03 14:05 UTC (History)
33 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 183506


Attachments
stacktrace (2.22 KB, text/plain)
2012-10-02 23:08 UTC, mago_ebon
Details
stacktrace (2.22 KB, text/plain)
2012-10-11 13:44 UTC, swpalmer
Details
stacktrace (2.22 KB, text/plain)
2012-10-11 13:47 UTC, swpalmer
Details
stacktrace (2.23 KB, text/plain)
2012-10-12 08:44 UTC, Exceptions Reporter
Details
stacktrace (2.22 KB, text/plain)
2012-10-13 19:44 UTC, mklaehn
Details
stacktrace (2.23 KB, text/plain)
2012-10-23 07:39 UTC, manikantannaren
Details
stacktrace (2.22 KB, text/plain)
2012-10-24 14:15 UTC, aldobrucale
Details
stacktrace (2.22 KB, text/plain)
2012-10-24 14:24 UTC, aldobrucale
Details
stacktrace (2.22 KB, text/plain)
2012-10-24 14:36 UTC, aldobrucale
Details
stacktrace (2.22 KB, text/plain)
2012-10-24 14:45 UTC, aldobrucale
Details
stacktrace (2.22 KB, text/plain)
2012-11-02 16:17 UTC, Jiri Prox
Details
sample file (2.86 KB, application/octet-stream)
2012-11-02 16:22 UTC, Jiri Prox
Details
stacktrace (2.22 KB, text/plain)
2012-11-04 22:29 UTC, ecerichter
Details
stacktrace (2.23 KB, text/plain)
2012-11-15 15:01 UTC, Jan Becicka
Details
stacktrace (2.23 KB, text/plain)
2012-11-15 17:01 UTC, michbarsinai
Details
stacktrace (2.22 KB, text/plain)
2012-11-19 17:22 UTC, aldobrucale
Details
stacktrace (4.33 KB, text/plain)
2012-11-21 13:55 UTC, Egor Ushakov
Details
stacktrace (2.22 KB, text/plain)
2012-11-21 17:43 UTC, aldobrucale
Details
stacktrace (2.22 KB, text/plain)
2012-11-22 11:43 UTC, mienamoo
Details
stacktrace (2.22 KB, text/plain)
2012-11-22 13:49 UTC, tim_sa
Details
stacktrace (2.22 KB, text/plain)
2012-11-22 13:52 UTC, tim_sa
Details
stacktrace (2.22 KB, text/plain)
2012-11-22 18:13 UTC, markiewb
Details
stacktrace (2.22 KB, text/plain)
2012-11-26 11:50 UTC, tim_sa
Details
stacktrace (2.22 KB, text/plain)
2012-11-26 23:23 UTC, ecerichter
Details
stacktrace (2.22 KB, text/plain)
2012-12-02 04:47 UTC, williambacchi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mago_ebon 2012-10-02 23:08:48 UTC
Build: NetBeans IDE Dev (Build 201210010929)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows 7

User Comments:
mago_ebon: Editing a file.




Stacktrace: 
javax.swing.text.BadLocationException: Invalid offset=6784 > (docLen+1)=6743
   at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.checkOffsetInContent(EditorDocumentContent.java:280)
   at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.createPosition(EditorDocumentContent.java:192)
   at javax.swing.text.AbstractDocument.createPosition(AbstractDocument.java:831)
   at org.netbeans.api.editor.fold.Fold.<init>(Fold.java:145)
   at org.netbeans.api.editor.fold.FoldHierarchy$ApiPackageAccessorImpl.createFold(FoldHierarchy.java:355)
   at org.netbeans.modules.editor.fold.FoldOperationImpl.createFold(FoldOperationImpl.java:156)
Comment 1 mago_ebon 2012-10-02 23:08:53 UTC
Created attachment 125259 [details]
stacktrace
Comment 2 swpalmer 2012-10-11 13:44:16 UTC
Created attachment 125777 [details]
stacktrace

Started typing in a java source file.
Comment 3 swpalmer 2012-10-11 13:47:16 UTC
Created attachment 125778 [details]
stacktrace

Java editor is hosed.  All edits are bringing up this error dialog.
Comment 4 Miloslav Metelka 2012-10-11 14:14:12 UTC
Looks like JavaElementFoldManager requests invalid fold bounds.
Comment 5 Exceptions Reporter 2012-10-12 05:35:15 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=183506
Comment 6 Exceptions Reporter 2012-10-12 08:44:15 UTC
Created attachment 125837 [details]
stacktrace
Comment 7 mklaehn 2012-10-13 19:44:15 UTC
Created attachment 125915 [details]
stacktrace
Comment 8 manikantannaren 2012-10-23 07:39:13 UTC
Created attachment 126363 [details]
stacktrace

Edited an existing class by adding a new field
Comment 9 aldobrucale 2012-10-24 14:15:16 UTC
Created attachment 126481 [details]
stacktrace

undo in java editor
Comment 10 aldobrucale 2012-10-24 14:24:17 UTC
Created attachment 126482 [details]
stacktrace

undo in java editor
Comment 11 aldobrucale 2012-10-24 14:36:16 UTC
Created attachment 126484 [details]
stacktrace

undo in java editor
Comment 12 aldobrucale 2012-10-24 14:45:16 UTC
Created attachment 126486 [details]
stacktrace

undo in java editor
Comment 13 Jiri Prox 2012-11-02 16:17:11 UTC
Created attachment 127031 [details]
stacktrace

BLE when reformatting document
Comment 14 Jiri Prox 2012-11-02 16:21:41 UTC
Steps to reproduce:
1) set global indentation setting to 
Number of space: 5
Tab size:9

2) open attached file and reformat
Comment 15 Jiri Prox 2012-11-02 16:22:23 UTC
Created attachment 127032 [details]
sample file
Comment 16 ecerichter 2012-11-04 22:29:07 UTC
Created attachment 127102 [details]
stacktrace

Typing String message (constant String) in the editor.
Comment 17 Jan Becicka 2012-11-15 15:01:30 UTC
Created attachment 127882 [details]
stacktrace
Comment 18 michbarsinai 2012-11-15 17:01:31 UTC
Created attachment 127890 [details]
stacktrace

1. Wrote a call to a nonexistant method of another object
2. Quick-Fixed the error to let NetBeans implement the nonexistant method
3. Pressed Command-B to go to a newly defined method.
4. BAM!

Thanks!
Michael
Comment 19 aldobrucale 2012-11-19 17:22:35 UTC
Created attachment 128085 [details]
stacktrace

pasted a method in a java class
Comment 20 Egor Ushakov 2012-11-21 13:55:38 UTC
Created attachment 128210 [details]
stacktrace
Comment 21 aldobrucale 2012-11-21 17:43:39 UTC
Created attachment 128222 [details]
stacktrace

Changed the return type for a vunction
Comment 22 Exceptions Reporter 2012-11-21 17:43:48 UTC
This bug already has 50 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=183506
Comment 23 mienamoo 2012-11-22 11:43:39 UTC
Created attachment 128257 [details]
stacktrace

Editing a TopComponent subclass while debugging the platform application.
Comment 24 Dusan Balek 2012-11-22 12:09:22 UTC
Additional diagnostics added.

http://hg.netbeans.org/jet-main/rev/3e3602d3dc71
Comment 25 tim_sa 2012-11-22 13:49:38 UTC
Created attachment 128262 [details]
stacktrace

hit ENTER
Comment 26 tim_sa 2012-11-22 13:52:43 UTC
Created attachment 128263 [details]
stacktrace

pasted text into editor
Comment 27 markiewb 2012-11-22 18:13:53 UTC
Created attachment 128277 [details]
stacktrace

Code completion after pasting javacode
Comment 28 Quality Engineering 2012-11-24 13:05:10 UTC
Integrated into 'main-golden', will be available in build *201211240959* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3e3602d3dc71
User: Dusan Balek <dbalek@netbeans.org>
Log: Diagnostic messages added (see issue #219409).
Comment 29 tim_sa 2012-11-26 11:50:22 UTC
Created attachment 128387 [details]
stacktrace

editing mult-line string
Comment 30 ecerichter 2012-11-26 23:23:31 UTC
Created attachment 128425 [details]
stacktrace

Typing "distinct" in a JPL query
Comment 31 Quality Engineering 2012-11-28 02:34:08 UTC
Integrated into 'main-golden', will be available in build *201211280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/205ac5774c9b
User: Dusan Balek <dbalek@netbeans.org>
Log: Additional diagnostic (see issue #219409).
Comment 32 williambacchi 2012-12-02 04:47:33 UTC
Created attachment 128704 [details]
stacktrace

past some code in editor
Comment 33 Dusan Balek 2012-12-06 16:30:38 UTC
Fixed in jet-main.

http://hg.netbeans.org/main-golden/rev/3e3602d3dc71
Comment 34 Marian Mirilovic 2013-01-03 14:05:36 UTC
*** Bug 224394 has been marked as a duplicate of this bug. ***