I don't know why but we do have recursion here :
at java.awt.AWTEventMulticaster.componentMoved(java.desktop@9ea/AWTEventMulticaster.java:177) at java.awt.AWTEventMulticaster.componentMoved(java.desktop@9ea/AWTEventMulticaster.java:177) at java.awt.AWTEventMulticaster.componentMoved(java.desktop@9ea/AWTEventMulticaster.java:177)
STATUS:Failed.`main' threw exception: java.lang.StackOverflowError

At the first line of this method :
    /**
     * Handles the componentMoved event by invoking the
     * componentMoved methods on listener-a and listener-b.
     * @param e the component event
     */
    public void componentMoved(ComponentEvent e) {
        ((ComponentListener)a).componentMoved(e);
        ((ComponentListener)b).componentMoved(e);
    }

That recursion surely should not be happening and I then don't know what breaks the recursion. Maybe it isn't broken. May be the test gets to dispose() before then - once the stack size
is increased.

Whatever the cause the proposed fix seems to be missing the real problem.

-phil.

On 8/4/17, 6:55 AM, Sergey Bylokhov wrote:
Hi, Manajit.
The code in the test and the code in the JButton does not have any recursion and use only loops. All buttons itself are stored in the heap not on the stack. Can you please clarify, where in our code the default size of the stack is too small?

On 04.08.2017 4:40, Manajit Halder wrote:
Hi All,

Kindly review the fix for JDK10.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8165863

Webrev:
http://cr.openjdk.java.net/~mhalder/8165863/webrev.00/

Root cause:
The problem was due to default JVM stack size, which was not enough for the creation of 10001 JButtons.

Fix:
Increased the JVM stack size to 2048k for this test case using JVM flag -Xss.

Regards,
Manajit



Reply via email to