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 39015 - [JDK1.5.0] NPE when closing files in editor
Summary: [JDK1.5.0] NPE when closing files in editor
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Martin Roskanin
URL:
Keywords: JDK_SPECIFIC
: 38686 38791 39048 39132 39154 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-20 17:05 UTC by Milan Kubec
Modified: 2007-11-05 13:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exc stack traces (2.02 KB, text/plain)
2004-01-20 17:07 UTC, Milan Kubec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2004-01-20 17:05:46 UTC
[dev-200401181900, JDK 1.5.0 b33]
NullPointerExceptions are thrown when closing java
files in editor.
Comment 1 Milan Kubec 2004-01-20 17:07:48 UTC
Created attachment 12980 [details]
exc stack traces
Comment 2 Martin Roskanin 2004-01-21 09:08:09 UTC
*** Issue 39048 has been marked as a duplicate of this issue. ***
Comment 3 Miloslav Metelka 2004-01-21 17:22:58 UTC
Seems like editor component can become null during kit uninstalling -
strange. I'll try to fix that into 3.6.
Comment 4 Milan Kubec 2004-01-22 07:34:45 UTC
I forgot the keyword.
Comment 5 Milan Kubec 2004-01-23 08:06:57 UTC
*** Issue 39154 has been marked as a duplicate of this issue. ***
Comment 6 Milan Kubec 2004-01-27 10:26:57 UTC
*** Issue 38791 has been marked as a duplicate of this issue. ***
Comment 7 Milan Kubec 2004-01-27 10:29:18 UTC
This problem becomes more important. JDK 1.5.0 will be released soon,
please take a look at it. Thanks.
Comment 8 Martin Roskanin 2004-01-27 14:33:41 UTC
*** Issue 39132 has been marked as a duplicate of this issue. ***
Comment 9 Martin Roskanin 2004-01-28 15:26:24 UTC
fixed in [maintrunk]

/cvs/editor/libsrc/org/netbeans/editor/BaseCaret.java,v  <-- 
BaseCaret.java
new revision: 1.96; previous revision: 1.95

/cvs/editor/libsrc/org/netbeans/editor/BaseTextUI.java,v  <-- 
BaseTextUI.java
new revision: 1.60; previous revision: 1.59

/cvs/editor/src/org/netbeans/modules/editor/CustomizableSideBar.java,v
 <--  CustomizableSideBar.java
new revision: 1.3; previous revision: 1.2

Comment 10 Jesse Glick 2004-01-28 15:41:59 UTC
BTW if you figured out *why* the editor component can become null when
the kit is uninstalled, you should mention that in this bug report,
for historical reasons. And of course if you think that it *shouldn't*
and that it is a bug in the JRE, you need to file that bug in BT and
place the # here and make sure the workaround in NB is removed as soon
as that bug is fixed in a public JRE release.
Comment 11 Martin Roskanin 2004-01-28 16:55:57 UTC
It became null because:

there is modification of BasicTextUI.uninstallUI method. At the end
there is editor=null; and this one wasn't present in jdk1.4 and before.

in BaseTextUI (editor text ui representation that extends BasicTextUI)
in the method BaseTextUI.uninstallUI there was at the begin of the
method super.uninstallUI, which causes that editor(our component)
variable became null. Later in BaseTextUI.uninstallUI was the call of
getComponent() that was already null. That was incorrect behaviour in
our side. The component is passed via parameter and it is not
necessary to get it in other way. The JDK1.5 behaviour is right.
Comment 12 Martin Roskanin 2004-01-29 09:14:36 UTC
*** Issue 38686 has been marked as a duplicate of this issue. ***
Comment 13 Milan Kubec 2004-01-29 14:25:05 UTC
Verified on dev-200401281900, JDK 1.5.0 b32c, b35.