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 70857 - Delete JDialog throws IllegalArgumentException.
Summary: Delete JDialog throws IllegalArgumentException.
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-30 06:59 UTC by abs
Modified: 2006-01-05 10:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
java source file. (4.56 KB, text/plain)
2006-01-02 13:57 UTC, abs
Details
form file. (4.22 KB, text/plain)
2006-01-02 13:58 UTC, abs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description abs 2005-12-30 06:59:40 UTC
I create JFrame and add JDialog to it. Then I try to delete JDialog but it
throws IllegalArgumentException.

I attach relevant log file.

java.lang.IllegalArgumentException: No element of a node selection may be null.
	at
org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.checkArgumentIsValid(ExplorerManager.java:191)
	at
org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.run(ExplorerManager.java:246)
	at org.openide.util.Mutex.readAccess(Mutex.java:287)
	at org.openide.explorer.ExplorerManager.setSelectedNodes(ExplorerManager.java:253)
	at org.netbeans.modules.form.FormDesigner$2.propertyChange(FormDesigner.java:218)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:341)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
	at java.awt.Component.firePropertyChange(Component.java:7159)
	at org.openide.windows.TopComponent.setActivatedNodes(TopComponent.java:253)
	at
org.netbeans.modules.form.FormDesigner.updateComponentInspector(FormDesigner.java:1134)
	at org.netbeans.modules.form.FormEditor$5.formChanged(FormEditor.java:644)
	at org.netbeans.modules.form.FormModel.fireEvents(FormModel.java:979)
[catch] at org.netbeans.modules.form.FormModel$EventBroker.run(FormModel.java:1079)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Tomas Stupka 2006-01-02 13:36:45 UTC
Sorry, but i could not reproduce the problem. Are you still able to reproduce it?
If so, could you, please, provide more detailed steps to reproduce it. It would
be ideal to attach the corresponding .java and .form files (saved in the last
good state) and describe the exact steps that lead to the exception. Some
informaton about the build you are using could also be useful.
Thank you in advance.
Comment 2 abs 2006-01-02 13:55:55 UTC
This problem still happen.(I download latest daily build 200601012030.)

I explain how to reproduce this problem detail.
1. create new java project.
2. create some package. (I create test package)
3. create JFrame
4. add JDialog to JFrame
5. add some JLabel and JTextField to JDialog.
6. compile
7. delete JDialog from Inspector view's Other Components.

Comment 3 abs 2006-01-02 13:57:58 UTC
Created attachment 28127 [details]
java source file.
Comment 4 abs 2006-01-02 13:58:28 UTC
Created attachment 28128 [details]
form file.
Comment 5 Tomas Stupka 2006-01-02 14:03:22 UTC
now i could reproduce it. thanks.
Comment 6 Marek Grummich 2006-01-02 15:26:13 UTC
Please, fix this issue in 5.0 branch also. 
Comment 7 Tomas Stupka 2006-01-02 15:50:26 UTC
Fixed in trunk.

The mentioned exception was just an aftereffect caused by a NPE in 
FormDesigner.highlightTopDesignComponentName(boolean bl). 
There also should be a check if the node reference isn't null.


Checking in FormDesigner.java;
/cvs/form/src/org/netbeans/modules/form/FormDesigner.java,v  <--  FormDesigner.java
new revision: 1.173; previous revision: 1.172
Comment 9 Tomas Pavek 2006-01-02 17:00:42 UTC
The diff looks ok.
Comment 10 Marek Grummich 2006-01-03 13:10:10 UTC
Verified in the trunk (200601021900) build by described testcase.
Comment 11 Tomas Stupka 2006-01-03 14:31:57 UTC
Integrated into release50 branch.
Comment 12 Marek Grummich 2006-01-05 10:48:05 UTC
Verified in the build 200601042030