Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 84587 - dummy launch not cleaned up when job terminated
Summary: dummy launch not cleaned up when job terminated
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-07 11:52 EST by Darin Wright CLA
Modified: 2005-02-09 09:04 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2005-02-07 11:52:02 EST
If I terminate a launch job from the progress view that is waiting on a build, 
its associated dummy launch object is not removed from the debug view.
Comment 1 Jared Burns CLA 2005-02-07 12:43:30 EST
The dummy launch is cleaned up when the build finishes. The problem is that the
code waits for the build to finish, then removes the launch and launches (or
doesn't if it's cancelled). I'll investigate if we can find out when the
launching job is cancelled.
Comment 2 Darin Wright CLA 2005-02-07 12:50:19 EST
use IJobChangeListener
Comment 3 Jared Burns CLA 2005-02-07 13:18:03 EST
Fixed in DebugUIPlugin. Please verify, DW.
Comment 4 Darin Wright CLA 2005-02-07 17:38:31 EST
Verified behavior, but question about listener cleanup:

* the job listener is removed whent he job is done
* the dummy launch is removed when the job is done, and when we're done 
joining on the build job

Issue: either the launch only needs to be removed when the job is done, or the 
job listener also needs to be removed when done the join (else we could be 
leaving listeners behind).
Comment 5 Jared Burns CLA 2005-02-07 18:21:03 EST
Unless I'm missing something, there's no leak here and the "redundant" removes
are by design. There are two paths that the code can take and so we need to
cover both cases to get good behavior.

1. Successful launch:
 a. Add the listener
 b. Start the job
 c. Start the join
 d. The join finishes and the dummy launch is removed
 e. The job launches the config
 f. The job finishes ("done" notification)
 g. Listener is removed. Dummy launch is removed (noop).
2. Cancelled launch:
 a. Add the listener
 b. Start the job
 c. Start the join
 d. The job is cancelled ("done notification")
 e. Listener is removed. Dummy launch is removed
 f. The join finishes and the dummy launch is removed (noop)

If we don't remove the launch in both cases, the dummy launch ends up sticking
around too long in whichever path we don't cover.
Comment 6 Darin Wright CLA 2005-02-09 09:04:49 EST
Verified.