Bug 4951

Summary: Breakpoints remain installed after target terminates
Product: [Eclipse Project] JDT Reporter: Darin Wright <darin.eclipse>
Component: DebugAssignee: Darin Wright <darin.eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P1    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Darin Wright CLA 2001-10-12 18:10:19 EDT
In latest code.

Run the 'Breakpoints' smoke test script. Note that after the target
terminates, two breakpoints remain green (installed), and one 
returns to blue (uninstalled). 

The breakpoints that remained installed for me were:
* method entry breakpoint on java.util.Vector.removeElement
* junit.samples.VectorTest [line 39] - testClone()

The breakpoint with the hit count returned to blue
Comment 1 Jared Burns CLA 2001-10-15 10:23:39 EDT
This problem was introduced by the VMDisconnectedException handling that was recently added. 
Instead of simply logging an error and returning when we get this exception, we often need to do 
some cleanup work.
In the case of this bug, we get a VMDisconnected exception in JavaBreakpoint#removeFromTarget and 
return without making the call to JavaBreakpoint#deregisterRequest, which is where the breakpoint's 
install count is decremented.
I'll go through the breakpoint hierarchy and try to fix up all such cases.
Comment 2 Jared Burns CLA 2001-10-15 10:43:21 EDT
This specific instance is fixed. Please verify.
Comment 3 Jared Burns CLA 2001-10-15 10:44:53 EDT
JavaBreakpoint#removeFromTarget now deregisters the request (decrements the
install count and removes itself as a listener) even if it receives a
VMDisconnectedException while trying to delete the request.
Comment 4 Darin Wright CLA 2001-10-15 10:52:58 EDT
Verified.