JDK-6207450 : Swing Integration Regression: b16: Swingset2: "Error occurred loading demo: ButtonDemo" (OOM Error)
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris,solaris_9
  • CPU: sparc
  • Submitted: 2004-12-11
  • Updated: 2010-04-02
  • Resolved: 2004-12-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6Resolved
Related Reports
Duplicate :  
Duplicate :  
Description
ButtonDemo does not appear in SwingSet2 on Solaris and Windows starting with
the integration of build b16.

This error is output to the terminal running SwingSet2:
Error occurred loading demo: ButtonDemo

This bug is sporadic, happening about 50% of the time on Solaris 9
with both Gnome and CDE, with the b16 integration build.

###@###.### 2004-12-13 20:28:02 GMT

The bug is also reproducible on Windows.
###@###.### 2004-12-14 21:29:21 GMT
###@###.### 2004-12-14 21:46:07 GMT

Comments
WORK AROUND Set -Xmx and -Xms to the same value to avoid this problem (but you might still run into the day one bug documented in 6186200, which will be fixed later in Mustang). ###@###.### 2004-12-20 22:36:37 GMT
11-12-2004

EVALUATION I've modified SwingSet2 (jar attached) to output the exception that is causing the failure. We tested on two different Windows machines and each only showed the failure one time out of about 20 runs. May fail more frequently on Solaris. In any case, here's the exception: Error occurred loading demo: ButtonDemo java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at SwingSet2.loadDemo(SwingSet2.java:822) at SwingSet2.loadDemos(SwingSet2.java:95) at SwingSet2$DemoLoadThread.run(SwingSet2.java:1411) Caused by: java.lang.OutOfMemoryError: Java heap space The ButtonDemo sub-demo fails to load but the other sub-demos continue to load fine. An OutOfMemoryError doesn't really make sense here. This doesn't sound like a Swing bug. Since I'm not sure what the root cause is, I'm making a guess and trying the gc folks first. ###@###.### 2004-12-15 18:44:48 GMT What does failure look like? Do the error messages show up on stdout/stderr and SwingSet2 fails to start, or does SwingSet2 start but the ButtonDemo tab is missing, or does it start and the tab is there, but the demo doesn't work? That is, how many buttons do I have to click to tell if it's working? ###@###.### 2004-12-15 19:25:15 GMT Normal Operation: 1) SwingSet2 splashscreen appears 2) SwingSet2 main frame appears 3) Demos start loading - buttons will be added to the toolbar as each one finishes - second demo to be loaded is the ButtonDemo, indicated by a button with a radiobutton and checkbox icon 4) Demos finish loading What we see during a failure: 1) SwingSet2 splashscreen appears 2) SwingSet2 main frame appears 3) Demos start loading 4) Error message on stdout/stderr when app tries to load ButtonDemo ButtonDemo button will not be added to toolbar 5) The rest of the demos continue loading normally You won't need to interact with the GUI at all to see the failure. If the ButtonDemo loads it's working / if you see an error message and it doesn't load then it fails. Hope that helps! ###@###.### 2004-12-15 19:48:20 GMT That does help. I still have to click the X box to close the application if it worked. Is there a property to tell SwingSet2 to close automatically if everything worked? E.g., for timing runs? ###@###.### 2004-12-15 20:13:35 GMT Unfortunately there isn't. SwingSet2 was designed to be a demo GUI application and not specifically for testing. Thanks. ###@###.### 2004-12-15 20:42:26 GMT I've attached (as file "out.txt") a log of the output when running with "-XX:+PrintGCDetails" showing a run when the error occurs. Within the ouput, you can see where the error occurs by searching for "Error occurred loading demo: ButtonDemo". ###@###.### 2004-12-17 20:30:12 GMT This is a regression caused by the changes in 5101236 and friends. That regression is being investigated under bug id 6209695. I am closing this as a duplicate of that bug, pointing to the testing information herein for verification after the fix is available. ###@###.### 2004-12-20 22:36:37 GMT
11-12-2004