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 194394 - [70cat] IllegalStateException: startOffset=1, length=-1, highlight: <2147483647,2147483647>, newLineOffset=0, docText.length()=1
Summary: [70cat] IllegalStateException: startOffset=1, length=-1, highlight: <21474836...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 195177 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-16 04:26 UTC by areeda
Modified: 2011-02-09 14:06 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 175888


Attachments
stacktrace (1.54 KB, text/plain)
2011-01-16 04:26 UTC, areeda
Details
stacktrace (1.54 KB, text/plain)
2011-01-17 10:33 UTC, FrantaM
Details
stacktrace (1.54 KB, text/plain)
2011-01-17 10:48 UTC, Exceptions Reporter
Details
stacktrace (1.54 KB, text/plain)
2011-01-17 12:57 UTC, Egor Ushakov
Details
stacktrace (1.54 KB, text/plain)
2011-01-19 06:57 UTC, aquaglia
Details
stacktrace (1.54 KB, text/plain)
2011-01-25 22:30 UTC, Egor Ushakov
Details
stacktrace (1.54 KB, text/plain)
2011-01-26 19:07 UTC, vince_soleil
Details
stacktrace (1.54 KB, text/plain)
2011-01-27 12:40 UTC, Erno Mononen
Details
stacktrace (1.54 KB, text/plain)
2011-01-30 06:43 UTC, areeda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description areeda 2011-01-16 04:26:21 UTC
This bug was originally marked as duplicate of bug 182504, 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 201101140000)
VM: Java HotSpot(TM) 64-Bit Server VM, 17.1-b03, Java(TM) SE Runtime Environment, 1.6.0_22-b04
OS: Linux

User Comments:
areeda: Java debugging: selected a watch item and hit enter to edit it.  Edit box came up before this exception.




Stacktrace: 
java.lang.IllegalStateException: startOffset=1, length=-1, highlight: <2147483647,2147483647>, newLineOffset=0, docText.length()=1
   at org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.createHighlightsView(HighlightsViewFactory.java:194)
   at org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.createView(HighlightsViewFactory.java:179)
   at org.netbeans.modules.editor.lib2.view.ViewBuilder.createNextView(ViewBuilder.java:396)
   at org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:335)
   at org.netbeans.modules.editor.lib2.view.ViewUpdates.buildViews(ViewUpdates.java:146)
   at org.netbeans.modules.editor.lib2.view.ViewUpdates.checkRebuild(ViewUpdates.java:516)
Comment 1 areeda 2011-01-16 04:26:25 UTC
Created attachment 105039 [details]
stacktrace
Comment 2 FrantaM 2011-01-17 10:33:10 UTC
Created attachment 105060 [details]
stacktrace

Context menu on existing watch; choose edit.
Comment 3 Exceptions Reporter 2011-01-17 10:48:10 UTC
Created attachment 105061 [details]
stacktrace
Comment 4 Egor Ushakov 2011-01-17 12:57:10 UTC
Created attachment 105065 [details]
stacktrace
Comment 5 aquaglia 2011-01-19 06:57:27 UTC
Created attachment 105133 [details]
stacktrace

View watch
Comment 6 Egor Ushakov 2011-01-25 22:30:33 UTC
Created attachment 105346 [details]
stacktrace
Comment 7 vince_soleil 2011-01-26 19:07:09 UTC
Created attachment 105381 [details]
stacktrace

I'm trying to debug a maven plugin with an attached process.
The exception occurs when it stops to my first break point.
Comment 8 Erno Mononen 2011-01-27 12:40:11 UTC
Created attachment 105399 [details]
stacktrace

debugging code
Comment 9 areeda 2011-01-30 06:43:12 UTC
Created attachment 105483 [details]
stacktrace

At a breakpoint I hit enter new watch.

One curious thing is that the application window was still on top.  NB while active was behind.
Comment 10 Exceptions Reporter 2011-02-02 07:14:33 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=175888
Comment 11 Miloslav Metelka 2011-02-02 14:28:56 UTC
Hopefully fixed. If the problem would persist please reopen the issue.

http://hg.netbeans.org/jet-main/rev/42d978461331
Comment 12 Quality Engineering 2011-02-03 05:53:42 UTC
Integrated into 'main-golden', will be available in build *201102030000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/42d978461331
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #194394 - IllegalStateException: startOffset=1, length=-1, highlight: <2147483647,2147483647>, newLineOffset=0, docText.length()=1.
Comment 13 Miloslav Metelka 2011-02-03 13:38:43 UTC
I have found a case where the problem can be reproduced with the yesterday's fix so reopening.
Comment 14 Miloslav Metelka 2011-02-03 15:34:57 UTC
Finally I have a fix for the problem. Luckily the scenario from issue 194944 helped me to reproduce the problem reliably. It was somewhat mysterious ;-) since the problem was not another thread conflicting with views building but instead a fact that at certain point the documentView.getDocument() != textComponent.getDocument() and the highlights view factory was assuming the wrong document at some point.
http://hg.netbeans.org/jet-main/rev/16565ef67e35
Comment 15 Quality Engineering 2011-02-05 06:10:30 UTC
Integrated into 'main-golden', will be available in build *201102050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/16565ef67e35
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #194394 - IllegalStateException: startOffset=1, length=-1, highlight: <2147483647,2147483647>, newLineOffset=0, docText.length()=1.
Comment 16 Miloslav Metelka 2011-02-09 14:06:05 UTC
*** Bug 195177 has been marked as a duplicate of this bug. ***