Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330062

Summary: AssertionError in TCFAnnotationManager
Product: [Tools] TCF Reporter: Anton Leherbauer <aleherb+eclipse>
Component: CoreAssignee: Project Inbox <dsdp.tm.tcf-inbox>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, eugene, pawel.1.piech
Version: unspecified   
Target Milestone: 0.4.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Anton Leherbauer CLA 2010-11-12 04:02:00 EST
This error occured when I opened the Breakpoints view and created a TCF breakpoint.
I believe with the new flexible hierarchy implementation of the Breakpoints view in Eclipse 3.6 this assertion is no longer valid.

java.lang.AssertionError
	at org.eclipse.tm.internal.tcf.debug.ui.model.TCFAnnotationManager.getBreakpointStatus(TCFAnnotationManager.java:287)
	at org.eclipse.tm.internal.tcf.debug.ui.model.TCFModelPresentation.getText(TCFModelPresentation.java:83)
	at org.eclipse.debug.internal.ui.LazyModelPresentation.getText(LazyModelPresentation.java:185)
	at org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView$1.getText(BreakpointsView.java:160)
	at org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider.getLabel(DebugElementLabelProvider.java:35)
	at org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider.getLabel(ElementLabelProvider.java:312)
	at org.eclipse.debug.internal.ui.model.elements.BreakpointLabelProvider.getLabel(BreakpointLabelProvider.java:33)
	at org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider.retrieveLabel(ElementLabelProvider.java:215)
	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)
Comment 1 Eugene Tarassov CLA 2010-11-12 15:58:12 EST
I cannot reproduce the error. For me, Breakpoints view in Eclipse 3.6 does not show TCF breakpoints at all, so getBreakpointStatus() is never called. In Eclipse 3.5 it works fine. Any idea about what has changed in Eclipse 3.6 that can make Breakpoints view to become blank when TCF object is selected in Debug view?
Comment 2 Pawel Piech CLA 2010-11-12 16:48:57 EST
In 3.6, the breakpoints view was migrated to a flexible hierarchy view.  Since TCF does not use the standard debug model objects it'll need to supply its own IViewerInputProvider.

The default view input provider is the org.eclipse.debug.internal.ui.elements.adapters.DefaultViewerInputProvider, which returns the DefaultBreakpointsViewInput object.  This input object will cause the default content providers to be used to populate the breakpoints view.  Since you probably don't want to customize the BP view layout at this point, you can just return an instance of DefaultBreakpointsViewInput(), or have your IViewerInputProvider implementation delegate to the default one.  You should be able to get access to the default viewer input provider through the launch object: getLaunch().getAdapter(IViewerInputProvider.class).
Comment 3 Eugene Tarassov CLA 2010-11-12 17:23:09 EST
(In reply to comment #2)

Yes, calling the default viewer input provider for Breakpoints view fixed the problem. The view now shows all breakpoints.
Thanks, Pawel!

Still cannot reproduce AssertionError.
Comment 4 Anton Leherbauer CLA 2010-11-15 03:06:20 EST
(In reply to comment #3)
> Still cannot reproduce AssertionError.

The AssertionError happens when the launch is disconnected.  I did not notice this detail before, because the target I am using always crashes when setting a breakpoint.
Comment 5 Anton Leherbauer CLA 2011-03-14 07:39:51 EDT
This has been fixed recently.
Comment 6 Doug Schaefer CLA 2011-05-17 10:49:21 EDT
Moving bugs to new home for IP log.