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 201602290002) VM: Java HotSpot(TM) 64-Bit Server VM, 25.60-b23, Java(TM) SE Runtime Environment, 1.8.0_60-b27 OS: Windows 7 User Comments: GUEST: PHP Format Code legitalk: Just editing code. legitalk: Writing PHP. GUEST: Same old shit - scanning forever GUEST: Nothing to add GUEST: editando arquivos GUEST: This error showed up while I was reporting an error GUEST: i have no idea Stacktrace: javax.swing.text.BadLocationException: Invalid offset=-1 < 0; docLen=20091 at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.checkOffsetNonNegative(EditorDocumentContent.java:271) at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.checkBoundsInContent(EditorDocumentContent.java:307) at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.getChars(EditorDocumentContent.java:231) at javax.swing.text.AbstractDocument.getText(AbstractDocument.java:810) at org.netbeans.editor.DocumentUtilities.copyText(DocumentUtilities.java:97) at org.netbeans.editor.BaseDocument.getChars(BaseDocument.java:1169)
Created attachment 158765 [details] stacktrace
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=220654
Created attachment 161550 [details] stacktrace Closed all documents in the IDE
IMHO GsfCompletionProvider.java:722 can be reached with caretOffset == -1 since JavaCompletionQuery(int queryType, int caretOffset) constructor is has usages that pass -1.
Thank you Mila, I added one more condition. http://hg.netbeans.org/jet-main/rev/d7dc808bbf21
Integrated into 'main-silver', will be available in build *201608270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/d7dc808bbf21 User: Milutin Kristofic <mkristofic@netbeans.org> Log: #258271 - javax.swing.text.BadLocationException: Invalid offset=-1 < 0; docLen=20091