This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 223612 - NPE in ProfilerClient.sendSimpleCmdToServer when stopping profiling session
Summary: NPE in ProfilerClient.sendSimpleCmdToServer when stopping profiling session
Status: RESOLVED WORKSFORME
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-10 15:22 UTC by Jiri Sedlacek
Modified: 2015-04-22 15:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Sedlacek 2012-12-10 15:22:43 UTC
Steps:

  1/ Fresh userdir, no projects
  2/ Setup direct or remote attach, monitoring, do not start the profiler agent
  3/ Click the Attach button in STP, Connecting to target VM dialog displays
  4/ Close the dialog using Cancel button and immediately click the Detach icon in profiler control panel
  5/ Choosing to not stop the profiled app throws the NPE immediately, choosing to stop in throws the NPE on each successive attach


java.lang.NullPointerException
	at org.netbeans.lib.profiler.ProfilerClient.sendSimpleCmdToServer(ProfilerClient.java:2024)
	at org.netbeans.lib.profiler.ProfilerClient.prepareDetachFromTargetJVM(ProfilerClient.java:802)
	at org.netbeans.lib.profiler.TargetAppRunner.prepareDetachFromTargetJVM(TargetAppRunner.java:316)
	at org.netbeans.modules.profiler.NetBeansProfiler.detachFromApp(NetBeansProfiler.java:1012)
	at org.netbeans.modules.profiler.actions.StopAction$2.run(StopAction.java:128)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1454)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2043)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor.post(RequestProcessor.java:424)
	at org.netbeans.modules.profiler.utilities.ProfilerUtils.runInProfilerRequestProcessor(ProfilerUtils.java:73)
	at org.netbeans.modules.profiler.actions.StopAction.performAction(StopAction.java:145)
	at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:129)
	at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
	at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:116)
	at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:99)
	at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:126)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
	at java.awt.Component.processMouseEvent(Component.java:6297)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
...
Comment 1 Tomas Hurka 2015-04-22 15:13:34 UTC
This works for me in latest dev. builds.