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 232779

Summary: StackOverflowError at java.util.Arrays.copyOf
Product: java Reporter: limuhob <limuhob>
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED FIXED    
Severity: normal CC: anebuzelsky, obrejla, teJECSke
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 202178
Attachments: stacktrace

Description limuhob 2013-07-16 09:24:50 UTC
This bug was originally marked as duplicate of bug 212755, 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.3 (Build 201302132200)
VM: OpenJDK Client VM, 23.7-b01, OpenJDK Runtime Environment, 1.7.0_21-b02
OS: Linux

User Comments:
limuhob: Click do refactoring on a floating rafactoring preview window.




Stacktrace: 
java.lang.StackOverflowError
   at java.util.Arrays.copyOf(Arrays.java:2245)
   at java.util.ArrayList.toArray(ArrayList.java:360)
   at java.awt.Container.getComponents_NoClientCode(Container.java:351)
   at java.awt.Container.getComponents(Container.java:343)
   at javax.swing.SortingFocusTraversalPolicy.enumerateCycle(SortingFocusTraversalPolicy.java:147)
   at javax.swing.SortingFocusTraversalPolicy.enumerateCycle(SortingFocusTraversalPolicy.java:156)
Comment 1 limuhob 2013-07-16 09:24:52 UTC
Created attachment 137193 [details]
stacktrace
Comment 2 Ondrej Brejla 2013-07-16 09:50:48 UTC
Discovered by workarounding issue #200510. 

Couldn't it be related? I think whether that SOE can cause refactoring window to keep floating around?
Comment 3 Antonin Nebuzelsky 2013-12-27 13:22:28 UTC
No related reported JDK bug that I could find. Also it is not reasonable to file a JDK bug with just the stacktrace which does not give any clue about the particular case.

I guess the problem is most probably on the side of NetBeans code which is constructing the set of UI components.

Stando, any guidance on a way to find the root cause?
Comment 4 Stanislav Aubrecht 2014-01-06 10:33:55 UTC
*** Bug 212755 has been marked as a duplicate of this bug. ***
Comment 5 Stanislav Aubrecht 2014-01-06 10:43:39 UTC
Refactoring window does some evil things with input focus. It is recommended to use requestFocusInWindow() instead of requestFocus() which is too aggressive.

(Please reassign if I picked the wrong component)
Comment 6 Ralph Ruijs 2015-03-09 10:39:45 UTC
(In reply to Stanislav Aubrecht from comment #5)
> Refactoring window does some evil things with input focus. It is recommended
> to use requestFocusInWindow() instead of requestFocus() which is too
> aggressive.
> 
> (Please reassign if I picked the wrong component)

Almost all calls to requestFocus have been removed. Just the one from the overridden method, as described in #41258, is still there.