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.
I attached NB profiler to JDeveloper for CPU profiling. When I am done with profiling, during detach i got this exception from the target process: Profiler Agent: Connection with agent closed Uncaught exception oracle.ide.ExitNotAllowedException at oracle.ide.IdeCore$1.checkExit(IdeCore.java:266) at java.lang.Runtime.exit(Runtime.java:88) at java.lang.System.exit(System.java:904) at org.netbeans.lib.profiler.server.ProfilerServer.doExit(ProfilerServer.java:1674) at org.netbeans.lib.profiler.server.ProfilerServer.handleClientCommand(ProfilerServer.java:1545) at org.netbeans.lib.profiler.server.ProfilerServer.listenToClient(ProfilerServer.java:1714) at org.netbeans.lib.profiler.server.ProfilerServer.run(ProfilerServer.java:682) This is reproducible consistently. I think that the profiler agent should not attempt to shutdown target process if the process is not started by the profiler. Also, the detach should be handled / negotiated smoothly with target process.
Product Version: NetBeans IDE 6.8 (Build 200912041610) Java: 1.6.0_18; Java HotSpot(TM) Client VM 16.0-b13 System: Linux version 2.6.18-164.0.0.0.1.el5xen running on i386; UTF-8; en_US (nb)
Of course that the profiler does not terminate profiled application on its own. There is a dialog asking you if you want to terminate target application on detach. If you say 'No' the application is not terminated.
Please note that the bug filed NB 6.8. The behavior is: when issue menu command: Profile > Detach..., at the time of the stack trace, *no dialogs* are displayed to ask whether to shutdown target process. Why handleClientCommand() happen before the dialog?
It does not matter if it is NB 6.8 - this works the same from the beginning. If you don't see the dialog than you probably checked 'Do not ask me again' checkbox when you used it in the past. To revert to default behavior go to 'Tool->Options->Miscellaneous->Profiler' and click 'Reset' button. This will reset the state of 'Do Not Show Again' confirmations.
Attaching screenshots of the related dialogs.
Created attachment 99548 [details] Detach dialog
Created attachment 99549 [details] Reset button in Profiler Options
Thanks, i verified about resetting all 'do not show' profiler options. It works as expected.