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

Bug 174096

Summary: Detaching from agent throws error
Product: z_Archived Reporter: Liz Dancy <lizdancy>
Component: TPTPAssignee: Paul Klicnik <pklicnik>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: ewchan, jkubasta
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: closed460

Description Liz Dancy CLA 2007-02-13 17:12:36 EST
Steps To Reproduce:
1.Profile an external Java application
2.Right click agent > Detach
 An error is thrown and the agent is not detached

Error Details: org.eclipse.core.runtime.CoreException

java.lang.ClassCastException
  at org.eclipse.hyades.trace.ui.internal.actions.DetachActionDelegate.doAction(DetachActionDelegate.java:34)
  at org.eclipse.tptp.trace.ui.provisional.control.provider.StandardAgentStateModifier.performProfileAction(StandardAgentStateModifier.java:176)
  at org.eclipse.tptp.trace.ui.provisional.control.provider.StandardAgentStateModifier.detach(StandardAgentStateModifier.java:72)
  at org.eclipse.tptp.trace.ui.provisional.control.provider.AbstractAgentControlProvider$1$DetachControlItem.run(AbstractAgentControlProvider.java:147)
  at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
  at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
  at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
  at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
  at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3465)
  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3079)
  at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2083)
  at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2047)
  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:449)
  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101)
  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:145)
  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:104)
  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:170)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:476)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1124)


More information:
This will fail many of the automated Profiling Test Cases because they rely on being able to delete the previous profile session afetr detaching. Delete cannot occur if the agent is not detached.
Comment 1 Eugene Chan CLA 2007-02-13 17:53:01 EST
Hi Liz, I cannot reproduce the problem with the following builds:
eclipse-SDK-N20070213-0010-win32.zip
emf-sdo-xsd-SDK-2.3.0M5.zip
tptp.sdk-TPTP-4.4.0-200702090949.zip

Did you open any view when you performed the detach action? and which view is in focus?
Comment 2 Liz Dancy CLA 2007-02-14 10:09:05 EST
Downgrading severity as this is only seen when running AGR tests which detach an agent. 
Comment 3 jkubasta CLA 2007-03-20 13:10:47 EDT
updated sizing
Comment 4 Paul Klicnik CLA 2007-04-12 09:12:38 EDT
Created an automated test which detaches from an agent and could not reproduce this problem. Also ran a few of a the detach automated tests from the CVS and still could not reproduce this problem. 

Resolving this defect as per my conversation with Liz
Comment 5 Paul Slauenwhite CLA 2009-06-30 10:28:52 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since the originator of this enhancement/defect has an inactive Bugzilla account and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.