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 130186 - NullPointerException at org.netbeans.modules.form.layoutdesign.LayoutDesigner.isUnplacedComponent
Summary: NullPointerException at org.netbeans.modules.form.layoutdesign.LayoutDesigner...
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-14 18:43 UTC by bassim
Modified: 2009-10-16 10:16 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 36815


Attachments
stacktrace (4.77 KB, text/plain)
2008-03-14 18:44 UTC, bassim
Details
stacktrace (4.77 KB, text/plain)
2008-03-14 18:44 UTC, bassim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bassim 2008-03-14 18:43:56 UTC
Build: NetBeans IDE 6.1 Beta (Build 200803050202)
VM: Java HotSpot(TM) Client VM, 10.0-b19
OS: Windows XP, 5.1, x86

User Comments: 
I am not sur, but i think this exception occurs after copying/pasting a JPanel form within a JDialog form
Comment 1 bassim 2008-03-14 18:44:00 UTC
Created attachment 58408 [details]
stacktrace
Comment 2 bassim 2008-03-14 18:44:13 UTC
Build: NetBeans IDE 6.1 Beta (Build 200803050202)
VM: Java HotSpot(TM) Client VM, 10.0-b19
OS: Windows XP, 5.1, x86

User Comments: 
I am not sur, but i think this exception occurs after copying/pasting a JPanel form within a JDialog form
Comment 3 bassim 2008-03-14 18:44:15 UTC
Created attachment 58409 [details]
stacktrace
Comment 4 Jan Stola 2008-03-17 12:17:22 UTC
I am sorry, I am not able to reproduce this issue. Could you, please, provide more details. It would be ideal to attach 
the corresponding form (both .java and .form file) and describe what should be copied and where it should be pasted. 
Thank you in advance.
Comment 5 Tomas Pavek 2008-03-25 11:01:20 UTC
The exception indicates there is a component in the layout model but it is not properly included in the layout (among
parent layout intervals). It looks like the copy operation failed for some reason and this is just a consequence. Thus
we need exact steps to reproduce. Maybe full IDE log file would help too.
Comment 6 Jan Stola 2008-03-28 16:02:36 UTC
No additional information provided => closing as non-reproducible. Feel free to reopen if you are still able to 
reproduce it, but don't forget to provide the required information then.
Comment 7 Exceptions Reporter 2008-10-09 12:27:25 UTC
Reopening - reproduced in NetBeans IDE Dev (Build 200809300201)
http://statistics.netbeans.org/exceptions/detail.do?id=125482
Comment 8 pribyl 2008-12-11 14:16:19 UTC
I was not able to reproduce, using the information provided. There has not been any additional report since October 2008.
I am closing this as worksforme.

Please reopen, if you encounter this problem again and try to provide exact steps to reproduce.

Thanks
Comment 9 pribyl 2009-09-30 09:48:47 UTC
I was finally able to find some reproducible steps:

1. Start IDE with clear userdir and create new project
2. Create new JFrame Form
3. Select the [JFrame] node in the inspector and select Add From Palette > ... > Label 
4. Drag and drop a JButton from Palette next to the JLabel from previous step

The exception was thrown after I clicked on the JButton in the form.
Comment 10 Jan Stola 2009-10-15 13:15:51 UTC
pribyl> I was finally able to find some reproducible steps:

I tried to follow your steps in the latest development build but I wasn't able to reproduce this exception. Are you 
still able to reproduce it?
Comment 11 Jan Stola 2009-10-15 16:12:42 UTC
Thanks to tpavek I was able to reproduce this issue. The exact steps to reproduce are:
1. Create a new JFrame
2. Select the [JFrame] node in the inspector and select Add From Palette > ... > Label
3. Add a new JButton into the form (from the Palette window).
4. Move the JButton to another place in the form.
5. Click on the JButton => NPE is thrown.
Comment 12 Tomas Pavek 2009-10-15 18:05:43 UTC
Fixed.

http://hg.netbeans.org/cdev/rev/2f8bd62278f9
Comment 13 Quality Engineering 2009-10-16 10:16:01 UTC
Integrated into 'main-golden', will be available in build *200910160201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2f8bd62278f9
User: Tomas Pavek <tpavek@netbeans.org>
Log: #130186: don't remove default layer if the last component is just moved within it