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 201110100600) VM: Java HotSpot(TM) 64-Bit Server VM, 20.1-b02, Java(TM) SE Runtime Environment, 1.6.0_26-b03 OS: Linux User Comments: gilbertoca: After previews crash I can't save the html file anymore. schkovich: alt+shift+f on php file GUEST: Editing a maven POM.XML Stacktrace: javax.swing.text.BadLocationException: Invalid offset=-536864573 < 0; docLen=3352 at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.checkOffsetNonNegative(EditorDocumentContent.java:245) at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.checkOffsetInContent(EditorDocumentContent.java:259) at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.createPosition(EditorDocumentContent.java:172) at org.netbeans.editor.BaseDocument.createPosition(BaseDocument.java:1377) at org.openide.text.NbDocument.createPosition(NbDocument.java:211) at org.netbeans.modules.editor.hints.AnnotationHolder.getPosition(AnnotationHolder.java:1052)
Created attachment 111930 [details] stacktrace
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=180848
Created attachment 123081 [details] stacktrace
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=180848
Created attachment 123082 [details] stacktrace
Created attachment 123085 [details] stacktrace
Created attachment 124376 [details] stacktrace BLE when selecting method in editor
This is very annoying issue, please fix it ASAP! Steps to reproduce: 1) have a class: public class ExampleClassRen { public static void main(String[] args) { } public void neco() { } } 2) use shift-arrow to select two lines -> exception is thrown
Unfortunately after closing file and reopening the exception is not thrown any more
Looks like the lineStart variable in AnnotationHolder.getPosition() may become -1 which should only be caused by having an invalid lineNumber variable out of bounds. But that should come from existing PositionBounds and the whole code should be properly read-locked so the only option would be that the PositionBounds would come from another document which is unlikely. I have added a logging and the fix attempts to choose either first or last line based on the given lineNumber. http://hg.netbeans.org/jet-main/rev/6b800a476fc7
Integrated into 'main-golden', will be available in build *201209200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6b800a476fc7 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #203591 - [71cat] javax.swing.text.BadLocationException: Invalid offset=-536864573 < 0; docLen=3352.