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 74469 - NPE closing cloned config editors...
Summary: NPE closing cloned config editors...
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 5.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: _ pcw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-06 01:55 UTC by _ pcw
Modified: 2006-06-04 23:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack trace (2.53 KB, text/plain)
2006-04-06 01:55 UTC, _ pcw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ pcw 2006-04-06 01:55:12 UTC
I opened an editor on sun-web.xml.  Then I cloned it 3 times, and selected
"close all other windows" from the popup window of the 3rd clone (4th editor). 
There may have been one more step, but I can't remember it now.

Anyway, I got the attached trace.  Further investigation suggests that cloned
editors may not have a dataobject attached (bad).
Comment 1 _ pcw 2006-04-06 01:55:30 UTC
Created attachment 29650 [details]
stack trace
Comment 2 _ pcw 2006-04-06 01:58:22 UTC
Looks like it was cloning one of the cloned editors that produce the NPE (which
make sense if a cloned editor somehow has a null dataobject because that's what
causes the NPE during initialization of the new editor).
Comment 3 _ pcw 2006-04-19 01:35:36 UTC
To reproduce:

Open config editor.
Clone once.
Close clone.
Clone original again - BANG.
Comment 4 _ pcw 2006-04-19 22:02:10 UTC
Problem was that the dataobject was caching a the first instance of the editor,
so when a second editor notified the dataobject it was being close, the
dataobject called a reset method on the first editor (which was staying open)
rather than the second one that was being closed.

Fixed by removing caching of the top component by the dataobject (and update
internals accordingly) and having editor pass reference to self to dataobject on
close notification.