Community
Participate
Working Groups
Build Identifier: I20100425-2000 The breakpoint view does not refresh itself to remove a breakpoint when two simultaneous debug sessions support different breakpoints (of the same type) and the 'group by > breakpoint types' and 'show breakpoints supported by selected target' are both enabled. Reproducible: Always Steps to Reproduce: 1. Apply the attached patch to JDT (the patch makes it so that watchpoints on field "aaa" are only 'supported by' launch configs named "AAA", and watchpoints on field "bbb" are only 'supported by' launch configs named "BBB") 2. Create a helloWorld app which contains integer fields "aaa" and "bbb" 3. Remove all breakpoints 4. Enable 'show breakpoints supported by selected target' 5. Enable 'group by > breakpoint types' 6. Create and launch a config named "AAA" for the app 7. Create and launch a config named "BBB" for the app 8. Create watchpoints for fields "aaa" and "bbb" 9. Select the AAA target. Verify watchpoint "aaa" is visible in the BP view 10. Select the BBB target. Verify watchpoint "bbb" is visible in the BP view 11. Delete watchpoint "bbb". Note that the watchpoint is still visible in the view. If you run either of the applications you can verify that the watchpoint was uninstalled (it is not hit), but it will remain in the view until you force a refresh by enabling 'group by > breakpoints'
Created attachment 166670 [details] JDT patch to provoke error condition
Created attachment 166671 [details] some tracing to accompany the recreation steps
Created attachment 166695 [details] Fix. What happens is that by the time IBreakpointsListener.breakpointRemoved() is called, the breakpoint marker is gone (sometimes), so the "bbb".equals(bp.getFieldName()) test fails and the breakpoint doesn't get removed. The good news is that this bug should not surface under normal circumstances because debuggers don't typically check the marker attributes to determine whether to filter a breakpoint, but it's still a real bug. This fix gets rid of the filtering of the removed breakpoints, and just checks whether the breakpoint was actually removed from the container (if a breakpoint was previously filtered it will not be removed).
Marking as minor since it shouldn't affect real world use cases. Thank you Jeremiah.
Created attachment 166696 [details] Complete fix patch.
Darin, would you like me to commit this fix? I believe I need you to approve it before committing.
Approved, please commit.
Fixed with patch committed for bug 311384.
Already reviewed.