<AWT Dev> Review Request for 8039081: [TEST_BUG] Test java/awt/TrayIcon/PopupMenuLeakTest/PopupMenuLeakTest.java fails
Ambarish Rapte
ambarish.rapte at oracle.com
Mon Nov 30 04:49:21 UTC 2015
Hi,
Gentle reminder, Please review.
Thanks,
Ambarish
From: Ambarish Rapte
Sent: Friday, November 20, 2015 4:01 PM
To: Prasanta Sadhukhan; Semyon Sadetsky; awt-dev at openjdk.java.net
Subject: <AWT Dev> Review Request for 8039081: [TEST_BUG] Test java/awt/TrayIcon/PopupMenuLeakTest/PopupMenuLeakTest.java fails
Hi All,
Please review the fix for JDK9,
Bug: https://bugs.openjdk.java.net/browse/JDK-8039081
Webrev: http://cr.openjdk.java.net/~arapte/8039081/webrev.00/
Issue:
è The test fails on windows with below exception,
Caused by: java.lang.IllegalArgumentException: illegal popup menu container class
at sun.awt.windows.WPopupMenuPeer.<init>(WPopupMenuPeer.java:65)
at sun.awt.windows.WToolkit.createPopupMenu(WToolkit.java:461)
at java.awt.PopupMenu.addNotify(PopupMenu.java:124)
at PopupMenuLeakTest.addNotifyPopup(PopupMenuLeakTest.java:63)
è With below exception on mac, ubuntu,
java.lang.OutOfMemoryError: Java heap space
at PopupMenuLeakTest.assertCollected(PopupMenuLeakTest.java:85)
at PopupMenuLeakTest.main(PopupMenuLeakTest.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:520)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
at java.lang.Thread.run(Thread.java:747)
Cause:
This is a test code issue.
On Windows Popup menu should have a valid parent container.
Is there is no parent container , then above exception is thrown.
And also, after throwing OOM exception, program tried to allocate new memory in catch.
Which results in failure again.
Fix:
Updated the test code to add popup menu as a child of Frame.
Verifiew on : Ubuntu, Windows & Mac
Many Thanks,
Ambarish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20151129/4c0457b9/attachment-0001.html>
More information about the awt-dev
mailing list