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 177930 - [68cat] NullPointerException at org.netbeans.modules.form.layoutdesign.LayoutDesigner.isUnplacedComponent
Summary: [68cat] NullPointerException at org.netbeans.modules.form.layoutdesign.Layout...
Status: RESOLVED WORKSFORME
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks: 136425
  Show dependency tree
 
Reported: 2009-12-01 09:30 UTC by _ theanuradha
Modified: 2012-06-13 07:59 UTC (History)
11 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 163203


Attachments
stacktrace (5.24 KB, text/plain)
2009-12-01 09:30 UTC, _ theanuradha
Details
stacktrace (4.93 KB, text/plain)
2010-07-19 18:51 UTC, misterm
Details
stacktrace (4.93 KB, text/plain)
2010-07-19 18:54 UTC, misterm
Details
stacktrace (4.93 KB, text/plain)
2011-01-18 17:42 UTC, Chiana
Details
stacktrace (4.93 KB, text/plain)
2011-01-18 17:45 UTC, Chiana
Details
stacktrace (4.63 KB, text/plain)
2011-01-18 17:51 UTC, Chiana
Details
Navigator (23.25 KB, image/png)
2011-10-04 14:07 UTC, asenk
Details
stacktrace (5.98 KB, text/plain)
2011-10-07 11:13 UTC, aldobrucale
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ theanuradha 2009-12-01 09:30:29 UTC
This bug was originally marked as duplicate of bug 130186, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 6.8 RC1 (Build 200911252200)
VM: Java HotSpot(TM) Client VM, 14.3-b01, Java(TM) SE Runtime Environment, 1.6.0_17-b04
OS: Windows 7, 6.1, x86

User Comments:
theanuradha: try to enclose JPanel to JTabpane

adamgmetzler@gmail.com: I was selecting different components in the Inspector window.

GUEST: Just ajusting the form layout...

ronnystandtke: wanted to set an icon to a previously copied label



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.isUnplacedComponent(LayoutDesigner.java:411)
        at org.netbeans.modules.form.FormDesigner.updateAssistantContext(FormDesigner.java:1112)
        at org.netbeans.modules.form.FormDesigner.selectionChanged(FormDesigner.java:1038)
        at org.netbeans.modules.form.FormDesigner.addComponentToSelectionImpl(FormDesigner.java:993)
        at org.netbeans.modules.form.ComponentInspector$NodeSelectionListener.propertyChange(ComponentInspector.java:521)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
Comment 1 _ theanuradha 2009-12-01 09:30:34 UTC
Created attachment 91944 [details]
stacktrace
Comment 2 Tomas Pavek 2009-12-01 10:06:01 UTC
theanuradha, do you still have the form on which this exception can be reproduced? That would help a lot, thanks.
Comment 3 _ theanuradha 2009-12-02 02:15:24 UTC
nope after restart problem not reproducible.
BUT you can checkout http://code.google.com/p/cubeon/source/browse/trunk/core/common/src/main/java/org/netbeans/cubeon/common/ui/internals/TaskEditorUI.java

and try to enclose "jPanel1" with tab and you can reproduce this issue
Comment 4 misterm 2010-07-19 18:51:47 UTC
Created attachment 100920 [details]
stacktrace
Comment 5 misterm 2010-07-19 18:54:46 UTC
Created attachment 100921 [details]
stacktrace
Comment 6 Chiana 2011-01-18 17:42:26 UTC
Created attachment 105106 [details]
stacktrace

Enclosed a JTextArea in a JPanel using the context meny, then marked the new panel in the inspector and this was thrown
Comment 7 Chiana 2011-01-18 17:45:26 UTC
Created attachment 105107 [details]
stacktrace

Well, has to try it again, just can't find the new panel in the form, it is either invisible or just not inserted...
Comment 8 Chiana 2011-01-18 17:51:45 UTC
Created attachment 105109 [details]
stacktrace

rightclicked the panel in the inspector to set a size on it, thrown when right-click
Comment 9 Tomas Pavek 2011-02-01 16:30:56 UTC
Reproducible on the TaskEditorUI form mentioned by anuradha:
http://cubeon.googlecode.com/svn/trunk/core/common/src/main/java/org/netbeans/cubeon/common/ui/internals/TaskEditorUI.java
http://cubeon.googlecode.com/svn/trunk/core/common/src/main/java/org/netbeans/cubeon/common/ui/internals/TaskEditorUI.form

Enclose jPanel1 into Tabbed Pane, then try to select the tabbed pane.
Comment 10 Quality Engineering 2011-09-25 14:06:12 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/75518cadd9ab
User: Tomas Pavek <tpavek@netbeans.org>
Log: #177930: enclose in container for components in alternate layer
Comment 11 asenk 2011-10-04 14:02:57 UTC
Product Version: NetBeans IDE Dev (Build 201110030601)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Linux version 2.6.38-11-generic running on i386; UTF-8; en_US (nb)

If I follow anuradha steps to reproduce on their code no exception is thrown anymore. But this use case doesn't work correctly anyway.

When JPanel1 is enclosed in Tabbed Pane, it is somehow doubled in navigator. More in attachment.
Comment 12 asenk 2011-10-04 14:07:03 UTC
Created attachment 111459 [details]
Navigator

Doubled JPanel1 in navigator.
Comment 13 aldobrucale 2011-10-07 11:13:55 UTC
Created attachment 111648 [details]
stacktrace

Clicked on a swing component in navigator (I had previously switched from null layout yo free design, and got an exception)
Comment 14 Tomas Pavek 2012-06-12 15:15:28 UTC
asenk@netbeans.org: I don't see the duplication happen in current build, do you?

I think we can close this as the original reproducible case was fixed, no new reports come in (except one for which we don't have steps to reproduce anyway).
Comment 15 asenk 2012-06-13 07:59:12 UTC
I'm not able to reproduce the bug or the "duplication". I agree with closing this bug.