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 214312 - StackOverflowError at javax.swing.LayoutComparator.compare
Summary: StackOverflowError at javax.swing.LayoutComparator.compare
Status: RESOLVED WONTFIX
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 163256 190960 215591 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-16 16:05 UTC by jorgenc
Modified: 2014-02-16 19:46 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 189598


Attachments
stacktrace (100.81 KB, text/plain)
2012-06-16 16:05 UTC, jorgenc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jorgenc 2012-06-16 16:05:19 UTC
This bug was originally marked as duplicate of bug 163256, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.0.1 (Build 201108281501)
VM: Java HotSpot(TM) Client VM, 14.3-b01, Java(TM) SE Runtime Environment, 1.6.0_17-b04
OS: Windows 7

User Comments:
jorgenc: se quedad




Stacktrace: 
java.lang.StackOverflowError
   at javax.swing.LayoutComparator.compare(LayoutComparator.java:50)
   at javax.swing.DefaultFocusManager.compareTabOrder(DefaultFocusManager.java:130)
   at javax.swing.CompareTabOrderComparator.compare(CompareTabOrderComparator.java:153)
   at java.util.Arrays.mergeSort(Arrays.java:1270)
   at java.util.Arrays.mergeSort(Arrays.java:1281)
   at java.util.Arrays.mergeSort(Arrays.java:1281)
Comment 1 jorgenc 2012-06-16 16:05:26 UTC
Created attachment 120940 [details]
stacktrace
Comment 2 Tomas Pavek 2012-06-19 12:02:42 UTC
Possible steps to reproduce:
* Create a new JPanel form, add a JButton to it.
* Set the button's focusTraversalPolicyProvider to true.
* Set the button's focusable property to false.
* Invoke form preview, if you don't get the exception right away, press Tab.

I was not able to get the exception from the designer (IDE itself), only from the preview dialog. Also, when the GUI form is run, the same exception happens. So when we build the Swing UI for preview, we also get it.

It's basically a Swing bug: either should not allow to set invalid combination of property values, or should not fail on it (end up in an infinite cycle). We could possibly warn the user somehow in this special case, but it would be really hacky, and the combination of the properties does not make sense anyway, so almost nobody really tries it (that's why we had only a few exception reports).

IMHO not worth trying to workaround.
Comment 3 Tomas Pavek 2012-07-18 16:45:28 UTC
*** Bug 163256 has been marked as a duplicate of this bug. ***
Comment 4 Tomas Pavek 2012-07-18 16:45:42 UTC
*** Bug 190960 has been marked as a duplicate of this bug. ***
Comment 5 Tomas Pavek 2012-07-18 16:45:56 UTC
*** Bug 215591 has been marked as a duplicate of this bug. ***