Bug 16203 - need to kill awt helper threads on gui app exit
Summary: need to kill awt helper threads on gui app exit
Alias: None
Product: classpath
Classification: Unclassified
Component: awt (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Thomas Fitzsimmons
: 23877 (view as bug list)
Depends on:
Reported: 2004-06-25 18:37 UTC by Chris Pickett
Modified: 2008-02-18 00:31 UTC (History)
4 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2004-12-28 02:09:01

creates an awt Frame f and calls f.dispose() (212 bytes, text/plain)
2004-06-25 18:40 UTC, Chris Pickett

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Pickett 2004-06-25 18:37:55 UTC
Sun gives three conditions that lets awt terminate its helper threads, as of
1.4, namely that:

   1) There are no displayable AWT or Swing components.
   2) There are no native events in the native event queue.
   3) There are no AWT events in java EventQueues.


It seems like it would be a good idea to get something like that into 
Classpath.  Sun's 1.4.2 VM has it's own "Suspend Checker Thread" (visible in
"ctrl-\"-generated thread/stack dumps) which appears to be some kind of reaper.

The test case attached below hangs on SableVM, which uses a recent Classpath. 
Apparently it does not hang on gij, but that may be for another reason.
Comment 1 Chris Pickett 2004-06-25 18:40:28 UTC
Created attachment 6630 [details]
creates an awt Frame f and calls f.dispose()
Comment 2 Thomas Fitzsimmons 2005-01-04 20:20:19 UTC
Fixed on java-gui-branch.
Comment 3 Chris Pickett 2005-01-12 14:03:52 UTC
Thank-you kindly.  Can you summarize your solution?
Comment 4 Thomas Fitzsimmons 2005-09-14 13:52:11 UTC
This broke when we moved back to the two-threaded event loop model.
Comment 5 Thomas Fitzsimmons 2005-09-14 13:53:36 UTC
*** Bug 23877 has been marked as a duplicate of this bug. ***
Comment 6 Andrew John Hughes 2008-02-17 18:18:43 UTC
This does not hang on either current CVS HEAD with cacao or jamvm, or on gij (version 4.3.0 20080213).  Can we close this bug?
Comment 7 Chris Pickett 2008-02-18 00:31:28 UTC
If I ever update SableVM's Classpath and it's still broken I'll reopen it.

However, maybe you should check that the duplicate is also fine: