Community
Participate
Working Groups
Build Identifier: I setup my Eclipse workspace against the latest CDT/DFS and I've got the following exception when I start a GDB session using a debug session to Cygwin. Caused by: java.lang.ClassCastException: org.eclipse.core.runtime.Status at org.eclipse.cdt.dsf.ui.viewmodel.update.AbstractCachingVMProvider$7.handleCompleted(AbstractCachingVMProvider.java:1213) at org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:291) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) ... 23 more I noticed that at that moment the exception getStatus() returned Status CANCEL: unknown code=1 null This is the line of the cast: PropertiesUpdateStatus missUpdateStatus = (PropertiesUpdateStatus)getStatus(); Reproducible: Always
Created attachment 181987 [details] Fix. Sorry about that. I should know better than make such an assumption.
I committed the fix. Dobrin please verify.
*** cdt cvs genie on behalf of ppiech *** Bug 328883 - AbstractCachingVMProvider throws ClassCastException [*] PropertiesUpdateStatus.java 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesUpdateStatus.java?root=Tools_Project&r1=1.1&r2=1.2 [*] AbstractCachingVMProvider.java 1.22 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java?root=Tools_Project&r1=1.21&r2=1.22 [*] FormattedValueRetriever.java 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValueRetriever.java?root=Tools_Project&r1=1.1&r2=1.2
Thanks Pawel. The exception is gone.
Created attachment 184196 [details] Corrected fix. (In reply to bug 321932 comment #11) > I'm getting an assertion pretty often with this fix. I'm not sure if it is > something that DSF-GDB was always doing wrong or if the assert made an wrong > assumption. > > Any opinion? > > ... The new exception is a side effect of my fix for this bug. After reviewing the changes a little while I found additional problems my my recent changes. This patch fixes that and adds a guard against the class cast exception.
I applied the corrected fix. Randy can you please review my changes.
Marc, can you verify whether the assertion error goes away for you. Thanks!
*** cdt cvs genie on behalf of ppiech *** Bug 328883 - AbstractCachingVMProvider throws ClassCastException Corrected Fix. [*] FormattedValueTests.java 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/FormattedValueTests.java?root=Tools_Project&r1=1.1&r2=1.2 [*] AbstractCachingVMProvider.java 1.23 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java?root=Tools_Project&r1=1.22&r2=1.23 [*] PropertiesUpdateStatus.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesUpdateStatus.java?root=Tools_Project&r1=1.2&r2=1.3 [*] VMPropertiesUpdate.java 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/VMPropertiesUpdate.java?root=Tools_Project&r1=1.4&r2=1.5 [*] FormattedValueRetriever.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValueRetriever.java?root=Tools_Project&r1=1.2&r2=1.3
(In reply to comment #7) > Marc, can you verify whether the assertion error goes away for you. Thanks! Seems to be gone. Thanks for the quick fix!