Hi,
Missing marker in a breakpoint is basically an expected race
condition in some situations. There is no ill side effects
besides the ugly message in the log. CModelPresentation should
log it as a warning or swallow the exception entirely.
Cheers,
Pawel
On 04/09/2013 10:00 AM, Ramy Siha wrote:
Hello,
I have an ILaunchesListener2.launchesTerminated function that
deletes all the breakpoints as:
DebugPlugin
.getDefault()
.getBreakpointManager()
.removeBreakpoints(
DebugPlugin.getDefault()
.getBreakpointManager()
.getBreakpoints(), true);
I also have an DebugEventHandler.handleSuspend function that
fires a delta with IModelDelta.CONTENT flag
The problem is that on slow machines, when the the program gets
suspended and the event with the model delta been handled, it
triggers updates in the TreeModelContentProvider ( to redraw the
breakpoints in the BreakpointsView )
if the user did press terminate while the update is still in
progress ( since the update is in UI thread while the
launchesTermiate is in the work ) I get the following exception:
org.eclipse.debug.core.DebugException: Breakpoint does not have an
associated marker.
at
org.eclipse.debug.core.model.Breakpoint.ensureMarker(Breakpoint.java:268)
at
org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint.ensureMarker(CBreakpoint.java:295)
at
org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint.getCondition(CBreakpoint.java:128)
at
org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint.isConditional(CBreakpoint.java:313)
at
org.eclipse.cdt.debug.internal.ui.CDebugModelPresentation.computeOverlays(CDebugModelPresentation.java:532)
at
org.eclipse.cdt.debug.internal.ui.CDebugModelPresentation.getLineBreakpointImage(CDebugModelPresentation.java:365)
at
org.eclipse.cdt.debug.internal.ui.CDebugModelPresentation.getBreakpointImage(CDebugModelPresentation.java:331)
at
org.eclipse.cdt.debug.internal.ui.CDebugModelPresentation.getBaseImage(CDebugModelPresentation.java:284)
at
org.eclipse.cdt.debug.internal.ui.CDebugModelPresentation.getImage(CDebugModelPresentation.java:226)
at
org.eclipse.debug.internal.ui.LazyModelPresentation.getImage(LazyModelPresentation.java:127)
at
org.eclipse.debug.internal.ui.DelegatingModelPresentation.getImage(DelegatingModelPresentation.java:143)
at
org.eclipse.debug.internal.ui.views.launch.DebugElementHelper.getImageDescriptor(DebugElementHelper.java:70)
at
org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider.getImageDescriptor(DebugElementLabelProvider.java:72)
at
org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider.getImageDescriptor(ElementLabelProvider.java:289)
at
org.eclipse.debug.internal.ui.model.elements.BreakpointLabelProvider.getImageDescriptor(BreakpointLabelProvider.java:43)
at
org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider.retrieveLabel(ElementLabelProvider.java:216)
at
org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider$LabelUpdater.run(ElementLabelProvider.java:160)
at
org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider$LabelJob.run(ElementLabelProvider.java:74)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
So the question is there is a way to wait for all breakpoint
redraw operation to terminate before deleting the breakpoints, or
is there is any workaround for this problem.
Note:
I'm working with CDT 7.0.2 & Eclipse 3.6.2
Best Regards,
Ramy Siha
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
|