Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348941 - [ui] CCE while selecting feature for uninstall
Summary: [ui] CCE while selecting feature for uninstall
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.7   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: Juno M1   Edit
Assignee: Matthew Piggott CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 349352 350107 351387 354235 365365 (view as bug list)
Depends on:
Blocks: 348986
  Show dependency tree
 
Reported: 2011-06-09 14:35 EDT by Stephan Herrmann CLA
Modified: 2012-02-12 16:46 EST (History)
11 users (show)

See Also:


Attachments
ResolutionStatusPage (5.67 KB, patch)
2011-06-09 16:05 EDT, Matthew Piggott CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2011-06-09 14:35:03 EDT
Using Eclipse SDK 3.7 RC4:

(1) Help > About > Installation Details > Installed Software
(2) Select one of the listed features
(3) Click Uninstall ..
(4) In the wizard the appears click on the feature within the list
(5) watch this exception:

java.lang.ClassCastException: org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement cannot be cast to org.eclipse.equinox.internal.p2.ui.model.AvailableIUElement
	at org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionStatusPage.setDetailText(ResolutionStatusPage.java:139)
	at org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionResultsWizardPage$1$1.selectionChanged(ResolutionResultsWizardPage.java:124)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188)
	at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1211)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1241)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:239)
	at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:233)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:403)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.equinox.p2.ui.ProvisioningUI.openUninstallWizard(ProvisioningUI.java:264)
	at org.eclipse.equinox.internal.p2.ui.actions.UninstallAction.performAction(UninstallAction.java:54)
	at org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction$1$1.run(ProfileModificationAction.java:86)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 1 Matthew Piggott CLA 2011-06-09 16:05:27 EDT
Created attachment 197727 [details]
ResolutionStatusPage

I'm not sure what has caused this to be a problem for 3.7 it has barely been touched since 3.6.2.

In any case, I've attached a patch which includes a fix and modifies a test (well several to move a method into a super class) to catch this.
Comment 2 Matthew Piggott CLA 2011-06-09 16:40:50 EDT
Released into head & 3.7 maintenance
Comment 3 Pascal Rapicault CLA 2011-06-14 15:05:06 EDT
*** Bug 349352 has been marked as a duplicate of this bug. ***
Comment 4 DJ Houghton CLA 2011-06-23 08:13:42 EDT
*** Bug 350107 has been marked as a duplicate of this bug. ***
Comment 5 Matthew Piggott CLA 2011-07-07 09:17:44 EDT
*** Bug 351387 has been marked as a duplicate of this bug. ***
Comment 6 Matthew Piggott CLA 2011-08-09 09:33:54 EDT
*** Bug 354235 has been marked as a duplicate of this bug. ***
Comment 7 DJ Houghton CLA 2011-12-01 16:55:39 EST
*** Bug 365365 has been marked as a duplicate of this bug. ***
Comment 8 Stijn de Witt CLA 2012-02-07 04:47:48 EST
REGRESSION:
I am seeing this issue again in Eclipse Indigo Service Release 1:

VERSION:
Version: 3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK
Build id: M20110909-1335

MESSAGE:
An error has occurred. See error log for more details.
org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement cannot be cast to org.eclipse.equinox.internal.p2.ui.model.AvailableIUElement

DETAILS FROM LOG:
java.lang.ClassCastException: org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement cannot be cast to org.eclipse.equinox.internal.p2.ui.model.AvailableIUElement
	at org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionStatusPage.setDetailText(ResolutionStatusPage.java:139)
	at org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionResultsWizardPage$1$1.selectionChanged(ResolutionResultsWizardPage.java:124)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
	...
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 9 Matthew Piggott CLA 2012-02-07 09:59:51 EST
We had problems tagging for the build and the fix did not make it into the 3.7.1 build.  I'm not sure if a 3.7.2 build is planned, but the fix does is in the 4.2 and 3.8 builds.
Comment 10 Stijn de Witt CLA 2012-02-12 16:23:22 EST
The 'Version' field on this bug still states '3.7' however.

I am assuming that field indicates the version of the software the bug is fixed in? If it is indeed only fixed in 3.8 it may help to set that field to that value.
Comment 11 Remy Suen CLA 2012-02-12 16:46:33 EST
(In reply to comment #10)
> The 'Version' field on this bug still states '3.7' however.
> 
> I am assuming that field indicates the version of the software the bug is fixed
> in? If it is indeed only fixed in 3.8 it may help to set that field to that
> value.

No, it means the bug was found in that version. It may be in an older version too, but at least someone has found it in that version anyway.