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 134368 - LAYOUT: IllegalArgumentException at LayoutInterval.add
Summary: LAYOUT: IllegalArgumentException at LayoutInterval.add
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:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-02 06:11 UTC by vicricker
Modified: 2008-09-22 05:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Form and Java source (2.43 KB, application/x-compressed)
2008-05-02 06:13 UTC, vicricker
Details
threadDump (15.48 KB, text/plain)
2008-05-02 07:57 UTC, Jana Maleckova
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vicricker 2008-05-02 06:11:01 UTC
I have a form with a field that if I resize it, it causes Netbeans to lock up and use 100% CPU.  The only way to recover
is to kill Netbeans.

I will attach the source code and form file to reproduce the problem.  It's a simple form with two password fields.  The
second password field is not sized properly.  Drag its left edge to align it with the first password field.  Netbeans
goes haywire and stretches both password fields to take all remaining horizontal space and aligns their right edges with
the right edge of the form.  Next, drag the right edge of the bottom password field to the left to give it a nice size.
 This causes Netbeans to lock up.
Comment 1 vicricker 2008-05-02 06:13:26 UTC
Created attachment 60949 [details]
Form and Java source
Comment 2 Peter Pis 2008-05-02 07:35:49 UTC
Could you please attach thread dump while you run into this problem?

http://wiki.netbeans.org/GenerateThreadDump
Comment 3 Jana Maleckova 2008-05-02 07:56:33 UTC
reproducible on 

Product Version: NetBeans IDE Dev (Build 20080430052947)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)

It is sufficient to follow the steps described below and do it on enclosed form. Then IDE gets stuck and doesn't respond
on any action. According to thread dump there is some deadlock in LayoutInternal class.
Need developer's evaluation.
Comment 4 Jana Maleckova 2008-05-02 07:57:15 UTC
Created attachment 60953 [details]
threadDump
Comment 5 Jan Stola 2008-05-06 16:53:19 UTC
The event dispatch thread got stuck in searching for the root of layout intervals because the parent of some
layout interval was added as a subinterval of the interval. I have added a check into LayoutInterval.add()
method to catch these problems.

So, if you try to reproduce the issue by now then an IllegalArgumentException is thrown and the change
is undone. It still remains to fix the root of the problem (the attempt to add the parent as a subinterval),
but the mentioned change fixes the livelock and allows you to continue in the work => lowering priority to P3.

Modified file:
http://hg.netbeans.org/main?cmd=changeset;node=7ca651555671
http://hg.netbeans.org/main?cmd=changeset;node=80fdd89dee26
Comment 6 Tomas Pavek 2008-09-21 18:54:31 UTC
Fixed.

http://hg.netbeans.org/main/rev/fcc3d4c3fb85
Comment 7 Quality Engineering 2008-09-22 05:41:23 UTC
Integrated into 'main-golden', will be available in build *200809220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/fcc3d4c3fb85
User: Tomas Pavek <tpavek@netbeans.org>
Log: #134368: some fixes related to center allignment