Created attachment 134697 [details]
20130506-77c7571a74e2. Attached profiler to a remote app in sampling mode, watched results for a while, decided I needed instrumented mode instead, so clicked the Detach button. Was asked whether I wanted to terminate the profiled app; I said no. Nothing seemed to change. Selected Profile » Attach and was again asked to detach the current session and agreed. Nothing. Finally selected Profile » Detach. Now the UI froze; thread dump attached.
Changes to not invoke the blocking code from EDT: http://hg.netbeans.org/profiler-main/rev/db883a01e5d4.
Note that this doesn't fix the main problem with randomly broken detach (even for the sampling session). See the attached thread dump from the profiled application.
Created attachment 135336 [details]
Thread dump for the detach failure
Might also be related to Bug 205363.
Integrated into 'main-golden', will be available in build *201306052301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jiri Sedlacek <firstname.lastname@example.org>
Log: Part of #230066 - do not invoke NetBeansProfiler.detachFromApp in EDT