Community
Participate
Working Groups
Build ID: I20070503-1400 Steps To Reproduce: 1. Profile StartStop by launching as an external java application and profiling for execution statistics (jdk 1.5+) 2. detach from agent 3. attach to agent result is an error in the workbench: "An unexpected error occurred while attempting to establish a connection with the JVMTI agent." details: java.lang.NullPointerException null java.lang.NullPointerException at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.attachToAgent(TIDelegateHelper.java:574) at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.attachToAgent(TIDelegateHelper.java:538) at org.eclipse.tptp.platform.jvmti.client.internal.controlproviders.TIAgentControlProvider$TIAgentStateModifier.doAction(TIAgentControlProvider.java:321) at org.eclipse.tptp.platform.jvmti.client.internal.controlproviders.TIAgentControlProvider$TIAgentStateModifier.performCollectiveAction(TIAgentControlProvider.java:271) at org.eclipse.tptp.platform.jvmti.client.internal.controlproviders.TIAgentControlProvider$TIAgentStateModifier.attach(TIAgentControlProvider.java:221) at org.eclipse.tptp.trace.ui.provisional.control.provider.AbstractAgentControlProvider$1$AttachControlItem.run(AbstractAgentControlProvider.java:108) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) 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:3673) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2365) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2329) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:497) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:436) at org.eclipse.equinox.launcher.Main.run(Main.java:1162) at org.eclipse.equinox.launcher.Main.main(Main.java:1137) More information: StartStop is a test class from the automation framework: /org.eclipse.tptp.ac.testautomation/automation-files/external_classes/StartStop.class Likely any class that will not run to completion right away can be used. This is reproduced using the 4.4.0-200705080100A build.
This causes failures in DetachAttachTest* profiler test cases.
This is a known issue gated by 183001
This is failing profile to file testcase as well.
Raise this as blocker as it's a regression.
Ali, The failure is when you attach to an agent when there is no launchConfig info passed. Do you persist that info on a per run basis? How did you do it for PI? I am assigning it to you. This issue is not gated by 183001 now
I agree that it doesn't depend on 183001. TIDelegateHelper.attachToAgent can have launchConfiguration == null in the case when the user selects a detached agent and re-attaches. I have added some code to avoid the NPE exception but the data after a re-attach is sent to the old agent instead of the new one. I can't figure out why this is happening. It seems that the data processor registered during the second round with the TI agent is never invoked. Guru, I will shortly attach a patch that will avoid the NPE exception. Can you investigate why the execution framework is not invoking the second data processor that is registered in TIDelegateHelper.configureDataProcessor(...)? Liz, you have added some code that assumes launchConfiguration is not null in attachToAgent. I have added an if-block around your code.
Created attachment 69579 [details] Here's the patch that avoid the NPE
Thanks Ali. I will investigate the data processor issue
Thanks Ali, the if block looks fine.
*** Bug 190494 has been marked as a duplicate of this bug. ***
Unable to reproduce the NPE. The dataprocessor issue is being addressed by 187090
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 this enhancement/defect has been resolved and unverified for more than 1 year 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.