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 149608 - LAYOUT: NPE at ....ComponentIterator.findNext
Summary: LAYOUT: NPE at ....ComponentIterator.findNext
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: 136425
  Show dependency tree
 
Reported: 2008-10-09 11:23 UTC by Petr Dvorak
Modified: 2012-06-15 06:13 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 125443


Attachments
stacktrace (2.98 KB, text/plain)
2008-10-09 11:23 UTC, Petr Dvorak
Details
stacktrace (2.98 KB, text/plain)
2008-10-09 11:28 UTC, Petr Dvorak
Details
Sample project with a panel from options.editor module... (16.60 KB, application/octet-stream)
2008-10-09 17:53 UTC, Petr Dvorak
Details
149608.wmv (348.96 KB, application/octet-stream)
2008-12-08 14:34 UTC, Jiri Vagner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Dvorak 2008-10-09 11:23:23 UTC
Build: NetBeans IDE Dev (Build 200810070201)
VM: Java HotSpot(TM) Client VM, 10.0-b24, Java(TM) SE Runtime Environment, 1.6.0_07-rev-b07
OS: Linux, 2.6.24-19-generic, i386

User Comments:
joshis: I moved a left edge of a separator to the right (it was probably not aligned anywhere, neither originally nor after I moved it). It happened when I was working with NB sources - when I attempted to move a separator by the "camel case behavior" in "Tools>Options>Editor>General" tab...



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.form.layoutdesign.LayoutUtils$ComponentIterator.findNext(LayoutUtils.java:546)
        at org.netbeans.modules.form.layoutdesign.LayoutUtils$ComponentIterator.next(LayoutUtils.java:563)
        at org.netbeans.modules.form.layoutdesign.LayoutUtils.contentOverlap(LayoutUtils.java:434)
        at org.netbeans.modules.form.layoutdesign.LayoutOperations.prepareGroupExtension(LayoutOperations.java:627)
        at org.netbeans.modules.form.layoutdesign.LayoutOperations.findIntervalToExtend(LayoutOperations.java:601)
        at org.netbeans.modules.form.layoutdesign.LayoutOperations.moveInsideSequential(LayoutOperations.java:472)
Comment 1 Petr Dvorak 2008-10-09 11:23:32 UTC
Created attachment 71448 [details]
stacktrace
Comment 2 Petr Dvorak 2008-10-09 11:28:26 UTC
Build: NetBeans IDE Dev (Build 200810070201)
VM: Java HotSpot(TM) Client VM, 10.0-b24, Java(TM) SE Runtime Environment, 1.6.0_07-rev-b07
OS: Linux, 2.6.24-19-generic, i386

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.form.layoutdesign.LayoutUtils$ComponentIterator.findNext(LayoutUtils.java:546)
        at org.netbeans.modules.form.layoutdesign.LayoutUtils$ComponentIterator.next(LayoutUtils.java:563)
        at org.netbeans.modules.form.layoutdesign.LayoutUtils.contentOverlap(LayoutUtils.java:434)
        at org.netbeans.modules.form.layoutdesign.LayoutOperations.prepareGroupExtension(LayoutOperations.java:627)
        at org.netbeans.modules.form.layoutdesign.LayoutOperations.findIntervalToExtend(LayoutOperations.java:601)
        at org.netbeans.modules.form.layoutdesign.LayoutOperations.moveInsideSequential(LayoutOperations.java:472)
Comment 3 Petr Dvorak 2008-10-09 11:28:36 UTC
Created attachment 71450 [details]
stacktrace
Comment 4 Petr Dvorak 2008-10-09 11:35:22 UTC
AE described in issue 70661 was thrown before this happened...
Comment 5 Tomas Pavek 2008-10-09 17:16:34 UTC
Can you please attach here the form (.form and .java files) where the exception happened and specify which component 
exactly (its name) you resized? I don't really know where to find "camel case behavior" 
in "Tools>Options>Editor>General". Thanks
Comment 6 Petr Dvorak 2008-10-09 17:52:36 UTC
Sure - I am attaching a project.

To reproduce the exception:

1. Open the form in designer
-> you will see the separator in the bottom goes through the label "camel case behavior"

2. Drag left edge of the separator so that it is approx. bellow letter 'g' of word "closing"
3. Drag the whole separator to the left so that it is aligned with the label "Camel Case Behavior"
4. Drag the whole separator to the right so that it is aligned with a right edge of the form
-> NPE

Are you able to reproduce the exception now?
Comment 7 Petr Dvorak 2008-10-09 17:53:28 UTC
Created attachment 71486 [details]
Sample project with a panel from options.editor module...
Comment 8 Jiri Vagner 2008-12-08 14:32:59 UTC
Thank you for your sample project, now we are able to reproduce it.
I found simpler steps to reproduce, check the attached movie.

Reproducible using ...

Product Version: NetBeans IDE Dev (Build 200812030201)
Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15
System: Windows Vista version 6.0 running on x86; Cp1250; cs_CZ (nb)
Comment 9 Jiri Vagner 2008-12-08 14:34:07 UTC
Created attachment 74695 [details]
149608.wmv
Comment 10 asenk 2011-10-04 12:46:57 UTC
Still valid

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)
Comment 11 Tomas Pavek 2012-06-12 17:45:14 UTC
The attached sample form is broken in that one of its components is placed twice (on two places) in the layout definition (this form is old, hopefully this cannot happen anymore). The layout model is then in an inconsistent state and the exception is just a result of that. I've implemented a fix to detect and workaround such case when the form is opened. It also improves fix of bug 118562.

http://hg.netbeans.org/jet-main/rev/4de8d93cbcd6
Comment 12 Quality Engineering 2012-06-15 06:13:33 UTC
Integrated into 'main-golden', will be available in build *201206150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4de8d93cbcd6
User: Tomas Pavek <tpavek@netbeans.org>
Log: #149608: workaround for bad (old) forms that might have a component interval placed more than once in the layout