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.

Bug 18346 - NullPointerException after double-click on error.
Summary: NullPointerException after double-click on error.
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC OS/2
: P3 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
: 18674 18885 18958 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-12-05 05:48 UTC by _ gtzabari
Modified: 2007-11-05 13:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The exception thrown. (2.45 KB, text/plain)
2001-12-07 13:57 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2001-12-05 05:48:34 UTC
dev build 200112030100

Annotations seem to be nice and broken in this release. Below I list a
removeAnnotation() exception but I've seen tons of exceptions for
addAnnotation() as well. I usually get these when opening/closing files.

Wed Dec 05 00:46:44 EST 2001: java.lang.NullPointerException: <no message>
java.lang.NullPointerException
        at
org.netbeans.modules.editor.NbEditorDocument.removeAnnotation(NbEditorDocument.java:177)
        at org.openide.text.NbDocument$3.run(NbDocument.java:381)
[catch] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java(Compiled
Code))
        at java.awt.EventQueue.dispatchEvent(EventQueue.java(Compiled Code))
        at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java(Compiled Code))
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java(Compiled Code))
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Comment 1 David Konecny 2001-12-05 09:54:49 UTC
It is hard to reproduce the problem from your description. Could you 
be please more specific. Is the problem somehow reproducible?  Which 
kind of annotations do you use? Breakpoints? Bookmarks? Does it happen 
always when you open some document, set some breakpoints, close the 
document and open the same document again?

Please give us as much detailes as you can. There is one bug for 
debugger which causes exactly the same exception, but maybe the cause 
is different.

However, this problem is so annoying and has appeared so many times 
that I decided to put into the code some more diagnostic messages 
which should help us in future to analyze which annotations caused the 
problem.
Comment 2 _ gtzabari 2001-12-05 13:21:52 UTC
Seems to me this occurs when I double click on errors listed in the 
output window, the window pops open and some sort of error-annotation 
is set. When I save the file or close it, it tries removing the 
annotation and gets that error. Note sometimes it has errors adding 
the annotation in the 1st place (when opening the file).

BTW: Thanks for extra debugging code, it'll help a lot :)
Comment 3 Jan Lahoda 2001-12-07 13:56:39 UTC
Hi,
   I have one quite reproducible case. The exception looks differently
from Gili's, so I am attaching it to the bug.
Steps:
1. Open any file in editor
2. Make here some errors, so it can not be compiled.
3. Compile it.
4. Double click on error in output window
5. Close the editor
6. Open the editor
7. Double click on the error again.
Quite often the NullPointerException will occur.
I am not sure whether this is problem of editor or OutputWindow.
The above steps looked very reproducible on build 200112062300 (the
attached exception is from this build).
Comment 4 Jan Lahoda 2001-12-07 13:57:49 UTC
Created attachment 3733 [details]
The exception thrown.
Comment 5 Jan Lahoda 2001-12-07 14:08:55 UTC
CCing core.
Comment 6 Martin Roskanin 2001-12-19 08:11:28 UTC
*** Issue 18674 has been marked as a duplicate of this issue. ***
Comment 7 David Konecny 2002-01-02 09:57:18 UTC
*** Issue 18885 has been marked as a duplicate of this issue. ***
Comment 8 David Konecny 2002-01-02 10:23:29 UTC
*** Issue 18958 has been marked as a duplicate of this issue. ***
Comment 9 David Konecny 2002-01-09 14:34:06 UTC
I was able to reproduce it and I discovered that this problem was 
caused by the regression in issue 18518! Issue 18518 was already fixed 
and now this work as well. So I'm marking the issue as FIXED.

I will add (for 3.3.1) some logging which should help udentify at 
least which type of annotation failed.
Comment 10 Quality Engineering 2003-06-30 18:00:54 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 11 Quality Engineering 2003-06-30 18:08:10 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.