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.
Build: NetBeans IDE Dev (Build 200806180005) VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b23 OS: Windows 2000, 5.0, x86 User comments: Happened when pressing shift-tab while editing the "resources.groovy" file STACKTRACE: (first 10 lines) javax.swing.text.BadLocationException: docLength=371: Invalid offset+length=420 at org.netbeans.editor.DocumentContent.checkBounds(DocumentContent.java:340) at org.netbeans.editor.DocumentContent.getString(DocumentContent.java:168) at javax.swing.text.AbstractDocument.getText(AbstractDocument.java:757) at org.netbeans.modules.groovy.editor.AstPath.<init>(AstPath.java:77) at org.netbeans.modules.groovy.editor.parser.GroovyOccurrencesFinder.run(GroovyOccurrencesFinder.java:142) at org.netbeans.modules.groovy.editor.parser.GroovyOccurrencesFinder.run(GroovyOccurrencesFinder.java:79) at org.netbeans.modules.gsfret.editor.semantic.MarkOccurrencesHighlighter.processImpl(MarkOccurrencesHighlighter.java:187) at org.netbeans.modules.gsfret.editor.semantic.MarkOccurrencesHighlighter.run(MarkOccurrencesHighlighter.java:127) at org.netbeans.modules.gsfret.editor.semantic.MarkOccurrencesHighlighter.run(MarkOccurrencesHighlighter.java:83) at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1272) another steps: -have a groovy script -repeatably type, delete (using backspace) and invoke CC in: "def r = new groovy.xml" => BLE
Hmm, I am not able to reproduce this, would need better steps to reproduce...
try this: -open some longer groovy script/class -put the cursor at the end -press and hold backspace (as you would like to delete everything char by char)
That doesn't help. I am still not able to reproduce. Maybe I'll need to try on something else than Mac?
Are you still able to reproduce this? If not, let's close it and reopen once it will appear again.
yes, I'm still able to reproduce this or at least something similar. Just happend to me in the latest build, here's actual stacktrace: javax.swing.text.BadLocationException: docLength=19: Invalid offset+length=21 at org.netbeans.editor.DocumentContent.checkBounds(DocumentContent.java:340) at org.netbeans.editor.DocumentContent.getString(DocumentContent.java:168) at javax.swing.text.AbstractDocument.getText(AbstractDocument.java:757) at org.netbeans.modules.groovy.editor.AstPath.<init>(AstPath.java:77) at org.netbeans.modules.groovy.editor.completion.CodeCompleter.getPathFromRequest(CodeCompleter.java:597) at org.netbeans.modules.groovy.editor.completion.CodeCompleter.complete(CodeCompleter.java:2071) at org.netbeans.modules.gsfret.editor.completion.GsfCompletionProvider$JavaCompletionQuery.addCodeCompletionItems(GsfCompletionProvider.java:565) at org.netbeans.modules.gsfret.editor.completion.GsfCompletionProvider$JavaCompletionQuery.resolveCompletion(GsfCompletionProvider.java:551) at org.netbeans.modules.gsfret.editor.completion.GsfCompletionProvider$JavaCompletionQuery.run(GsfCompletionProvider.java:387) at org.netbeans.modules.gsfret.editor.completion.GsfCompletionProvider$JavaCompletionQuery.run(GsfCompletionProvider.java:219) at org.netbeans.napi.gsfret.source.Source.runUserActionTask(Source.java:467) at org.netbeans.modules.gsfret.editor.completion.GsfCompletionProvider$JavaCompletionQuery.query(GsfCompletionProvider.java:292) at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:218) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
*** Issue 142038 has been marked as a duplicate of this issue. ***
Blind fix. http://hg.netbeans.org/main/rev/47c384ada8ed
Integrated into 'main-golden', available in build *200807300201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/47c384ada8ed User: Martin Adamek <martin_adamek@netbeans.org> Log: #138353: javax.swing.text.BadLocationException: docLength=371: Invalid offset+length=420
this really seems to be fixed... v.