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 29504 - Event Dispatching Thread is leaked
Summary: Event Dispatching Thread is leaked
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-12 09:50 UTC by _ briansmith
Modified: 2005-07-27 09:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed (incomplete) patch for demonstration purposes only (6.27 KB, patch)
2002-12-12 09:56 UTC, _ briansmith
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ briansmith 2002-12-12 09:50:51 UTC
[Copied from users@mdr]

I seem to be getting a thread leak when using MDR
in my Ant task. I am trying to understand how
MDRepository.shutdown() causes the event
dispatching thread to stop. I can't see anything
in the MDR source code that would stop the thread.

I changed the code that creates the thread so that
it labels it "MDR event dispatcher" and then ran
the code in the debugger. Even after
repository.shutdown() has been called, the "MDR
event dispatcher" thread is still in "Wait" state.

This is really obvious when running my ant task
inside the IDE because the "Execution View" tab in
the IDE doesn't remove the Ant process from the
list after it is done executing.
Comment 1 _ briansmith 2002-12-12 09:56:11 UTC
Created attachment 8283 [details]
proposed (incomplete) patch for demonstration purposes only
Comment 2 _ briansmith 2002-12-12 10:39:43 UTC
The patch I just attached makes kills the thread when the repository
is shutdown. Without the patch, the event dispatching thread remains
in "wait" state after the repository is shut down.

I thought that this fix was going to require a lot more work but
actually it might do the job all by itself if try/finally blocks were
added in MdrStorage.shutdown() (to make sure that the thread is
stopped regardless of any errors encountered beforehand) and in
NBMDRepositoryImpl.shutdown() (to set mdrStorage = null even if an
execption occurred in mdrStorage.shutdown()).

Comment 3 Martin Matula 2003-01-06 14:31:18 UTC
Patch integrated. Thanks!
Comment 4 Jiri Prox 2005-07-27 09:04:31 UTC
quiet for too long, verified