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.
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)
Created attachment 105039 [details] stacktrace
Created attachment 105060 [details] stacktrace Context menu on existing watch; choose edit.
Created attachment 105061 [details] stacktrace
Created attachment 105065 [details] stacktrace
Created attachment 105133 [details] stacktrace View watch
Created attachment 105346 [details] stacktrace
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.
Created attachment 105399 [details] stacktrace debugging code
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.
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=175888
Hopefully fixed. If the problem would persist please reopen the issue. http://hg.netbeans.org/jet-main/rev/42d978461331
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.
I have found a case where the problem can be reproduced with the yesterday's fix so reopening.
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
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.
*** Bug 195177 has been marked as a duplicate of this bug. ***