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 62278

Summary: NPE OverlayLayout.preferredLayoutSize when resized component
Product: guibuilder Reporter: Jiri Prox <jiriprox>
Component: Natural LayoutAssignee: issues@guibuilder <issues>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P1    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: form file
java file
messages.log
Exception
Snapshot
The NPE Exception from the exception box
RuntimeException
java file
form file

Description Jiri Prox 2005-08-15 12:50:39 UTC
NB 4.2 dev build 20050815

When I resized component I got stream of NPEs. After closing form the stream
continued until the shutdown of whole IDE.

The stream can be caused by another exception which occure earlier in the log,
but  the NPEs were produced so quickly I couldn't notice it properly.

Steps to reproduce:
1) open attached 
2) select the JTree
3) resize it to the right side to overlap first letters from labels

java.lang.NullPointerException
	at javax.swing.OverlayLayout.preferredLayoutSize(OverlayLayout.java:110)
	at java.awt.Container.preferredSize(Container.java:1558)
Comment 1 Jiri Prox 2005-08-15 12:54:32 UTC
Created attachment 23809 [details]
form file
Comment 2 Jiri Prox 2005-08-15 12:54:47 UTC
Created attachment 23810 [details]
java file
Comment 3 Jiri Prox 2005-08-15 12:55:18 UTC
Created attachment 23811 [details]
messages.log
Comment 4 Tomas Pavek 2005-08-18 21:32:04 UTC
Seems to be fixed after last changes. Likely same cause as issue 62276 or issue
62265.
Comment 5 Jiri Prox 2005-08-23 14:53:17 UTC
verified
Comment 6 Marek Grummich 2005-08-23 15:03:18 UTC
Reopen - AssertionError - LayoutRegion.overlap(LayoutRegion.java:323) is thrown
Steps:
- open an attached file
- move jLabel8 bellow JLabel6 and jTextField4 bellow jTextField3
- resize JPanel by the attached snapshot; firstly in the horizontal direction
=> an attached exception is thrown when you resize verticaly
Comment 7 Marek Grummich 2005-08-23 15:04:29 UTC
Created attachment 24152 [details]
Exception
Comment 8 Marek Grummich 2005-08-23 15:05:25 UTC
Created attachment 24153 [details]
Snapshot
Comment 9 hash9 2005-09-09 12:43:46 UTC
I get an exception the same as the intial exception, with similar problems.

I had to close the IDE to stop the null pointer exceptions.
Comment 10 hash9 2005-09-09 12:44:58 UTC
Created attachment 24659 [details]
The NPE Exception from the exception box
Comment 11 Jiri Prox 2005-09-13 14:27:33 UTC
I've repeated Marek's steps and got another exception. This hapends when the
JPanel is resized vertically so its bottom edge matches bottom of one of the
tree buttons in the left-bottom part of the form.

java.lang.RuntimeException: Error occured. Use undo to return to the last good
state.
	at
org.netbeans.modules.form.layoutdesign.support.SwingLayoutBuilder.createLayout(SwingLayoutBuilder.java:137)
	at
org.netbeans.modules.form.layoutdesign.support.SwingLayoutBuilder.setupContainerLayout(SwingLayoutBuilder.java:73)
Comment 12 Jiri Prox 2005-09-13 14:28:28 UTC
Created attachment 24752 [details]
RuntimeException
Comment 13 Milan Kubec 2005-09-14 16:19:23 UTC
Increasing priority, because this situation leads to large number of exceptions.
The form editor doesn't have to be some complex. I will attach lighter version.
Try to add JLabel in front of the JTextField4. It will break the layout and then
try to fix the layout by shifting with those components.
Comment 14 Milan Kubec 2005-09-14 16:20:54 UTC
Created attachment 24803 [details]
java file
Comment 15 Milan Kubec 2005-09-14 16:21:59 UTC
Created attachment 24805 [details]
form file
Comment 16 Milan Kubec 2005-09-15 14:35:20 UTC
Exceptions starts to pop up after resizing the panel towards lower part and
releasing the mouse when the panel snaps to the horizontal line between
textfields  and labels.
Comment 17 Tomas Pavek 2005-09-20 09:03:24 UTC
The last mentioned exceptions seem fixed in today build.
Comment 18 Tomas Pavek 2005-09-23 15:53:40 UTC
Integrated into release50_beta branch.
Comment 20 Jiri Prox 2005-12-08 10:01:07 UTC
verified