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 46694 - Edit event fires NPE
Summary: Edit event fires NPE
Status: CLOSED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Jan Stola
URL:
Keywords: JDK_SPECIFIC
Depends on:
Blocks:
 
Reported: 2004-07-28 14:13 UTC by Jaromir Uhrik
Modified: 2006-03-24 10:07 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Ide.log attached (324.31 KB, text/plain)
2004-07-28 14:15 UTC, Jaromir Uhrik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2004-07-28 14:13:55 UTC
[200407271830; j2sdk1.4.2_05]
1.Create new JFrame form and add the JButton to it
2.Select the button in component inspector
3.In properties panel select Events category
4.Click to edit actionPerformed and press Enter
5.Exception dialog appears (see ide.log)
Comment 1 Jaromir Uhrik 2004-07-28 14:15:35 UTC
Created attachment 16517 [details]
Ide.log attached
Comment 2 Jaromir Uhrik 2004-07-28 14:18:45 UTC
There is no exception when I'm running on j2sdk1.5b59 -> adding
JDK_SPECIFIC keyword.
Comment 3 Jan Stola 2004-07-28 16:54:55 UTC
I obtained these NPEs also in the following way:

1. Invoke Open action on some form.
2. Invoke Edit action on another form.
3. Move mouse over editor.

It seems to be caused by form group close.
The corresponding code was changed by mkleint
(FormEditorSupport revision 151) as a fix
of issue 45666. When I remove the invokeLater
introduced by this fix then the exception
is not thrown => reassigning to Milos.
Comment 4 Milos Kleint 2004-07-30 09:18:48 UTC
as i mentioned in the 45666 bug, my fix to form module was considered
simplified. you should reevaluate the way you open/close window groups.

the stacktrace of the NPEs doesn't look like it could be linked the
invoke later stuff. it's a mere conicidence IMHO. I will look into it.
Comment 5 Milos Kleint 2004-07-30 15:36:26 UTC
j2sdk1.4.2_01 and nb build 200407291800.
Cannot reproduce using any of these scenarios.

given the stacktrace ends in sun private packages and there's nothing
from netbeans there, I'd say it's a jdk bug in that particular version.
I have to reiterate that postponing the form group closing cannot have
a direct effect on the exception.

reassigning back, please look in the jdk bug db and file it as a bug
if it's not there already.

Comment 6 Jan Stola 2004-08-02 14:24:23 UTC
This is a JDK bug #5057174 (attempt to access already cleared peer
of some component). The bug is exposed by mkleint's invokeLater
(the peer is already cleared, but the component still has focus?).
No workaround is mentioned in the bug evaluation, but another
invokeLater seems to help :-). Feel free to reopen the issue
if the workaround fails somewhere.
Comment 7 Jaromir Uhrik 2004-08-12 16:30:54 UTC
Verified in 20040812; j2sdk1.5.0-beta3-b59 - the exception is doesn't
appear to me now.
Comment 8 Milos Kleint 2004-09-22 08:33:14 UTC
I think I managed to make the window system reentry-safe. (thus window
system methods can be safely called from the componentShowing() and
componentHiding() callbacks) Can you guys try removing the
invokeLater() calls and see if everything works correctly?
Comment 9 Jan Stola 2004-09-22 10:46:44 UTC
It seems to work fine without the invokeLater() calls by now.
I have removed them.