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: | NullPointerException at org.netbeans.editor.Annotations.addAnnotation | ||
---|---|---|---|
Product: | editor | Reporter: | IrianR |
Component: | -- Other -- | Assignee: | Svata Dedic <sdedic> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | akobberup, alexvsimon, gjong, jiriprox, jskrivanek, katsuke, lhochet, marfous, markiewb, mromashova, NukemBy, pjiricka, tstupka, vriha, vv159170 |
Priority: | P1 | ||
Version: | 8.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 209919 |
Attachments: |
stacktrace
stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace |
Description
IrianR
2014-05-26 07:33:42 UTC
Created attachment 147438 [details]
stacktrace
Created attachment 147439 [details]
stacktrace
Nothing code related - using the terminal window
Created attachment 147441 [details]
stacktrace
reopened IDE
Created attachment 147442 [details]
stacktrace
start IDE with opened project
Created attachment 147444 [details]
stacktrace
I moved mouse over source code in editor.
NPE is a result of fixing bug #235211. NPE blocks editor. Created attachment 147446 [details]
stacktrace
NPE blocks editor
Created attachment 147450 [details]
stacktrace
just opened a file in the editor
Created attachment 147452 [details]
stacktrace
Opening a set of projects
result of fixing #235211 getAnnotations().addAnnotation(a); should be inside if statement if (annotation.getAnnotationType() != null) { } patch should be hg diff editor/src/org/netbeans/modules/editor/NbEditorDocument.java diff --git a/editor/src/org/netbeans/modules/editor/NbEditorDocument.java b/editor/src/org/netbeans/modules/editor/NbEditorDocument.java --- a/editor/src/org/netbeans/modules/editor/NbEditorDocument.java +++ b/editor/src/org/netbeans/modules/editor/NbEditorDocument.java @@ -239,9 +239,9 @@ if (annotation.getAnnotationType() != null) { a = new AnnotationDescDelegate(this, startPos, length, annotation); annoMap.put(annotation, a); + getAnnotations().addAnnotation(a); } } - getAnnotations().addAnnotation(a); } finally { readUnlock(); } Created attachment 147455 [details]
stacktrace
sorry, no idea (I had a running HTML5 project in embedded browser)
Created attachment 147460 [details]
stacktrace
Just openned IDE with 4 projects (1 HTML, 1 PHP, 2 Maven's web projects)
Please could you fix that ASAP, that's pretty blocker for usage of daily builds. Thanks. Created attachment 147462 [details]
stacktrace
Still more and more these issues. :/
Svata, please, evaluate regression Created attachment 147463 [details]
stacktrace
NPE when pasting html code
Created attachment 147466 [details]
stacktrace
Switchted to a file from the documents window
Fix: http://hg.netbeans.org/jet-main/rev/f090420e43b4 I made same fix as Maria suggested. I discussed this also with Svata. Integrated into 'main-silver', will be available in build *201405310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/f090420e43b4 User: Milutin Kristofic <mkristofic@netbeans.org> Log: #244726 - NullPointerException at org.netbeans.editor.Annotations.addAnnotation |