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.
Summary: | [71cat] javax.swing.text.BadLocationException: Invalid offset=-536864573 < 0; docLen=3352 | ||
---|---|---|---|
Product: | editor | Reporter: | schkovich <schkovich> |
Component: | Hints & Annotations | Assignee: | Miloslav Metelka <mmetelka> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ehsavoie, gilbertoca, jiriprox |
Priority: | P2 | ||
Version: | 7.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 180848 |
Attachments: |
stacktrace
stacktrace stacktrace stacktrace stacktrace |
Description
schkovich
2011-10-12 11:17:54 UTC
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. |