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.
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) ...
This works for me in latest dev. builds.