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.
Call into TargetAppRunner.terminateTargetJVM() should be done in a worker thread. AWT thread should be kept free at the moment. Indication of action in progress should be provided.
Created attachment 20341 [details] Event Queue stack trace
Ian, May I ask you to investigate with Tonda if this issue really fits the P2 category? I personally never noticed any performance problems with application stopping, but perhaps it's more visible on other machines.
I actually agree with Tonda here - all of the issues against blocking AWT thread are valid. The UI responsiveness guidelines together with the need to avoid blocking simple repainting even for periods of ~100ms, is very needed - as you point out, the slower the machine, the more pronounced those problems would be. The solution to most of those is fairly simple (and same for all of the issues) - post the real task to RequestProcessor and repaint only with progress or when the task finishess. Not a big deal, although when I last attempted to do this, I encountered some issues with the AsyncMessage callback from the engine, so there will likely be some changes in the engine as well related to moving some of its methods to background threads.
Ok, I see. Please feel free to assign the appropriate owner/milestone to it.
Self assign for M6
Fixed for M6. Created a separate request processor for all of Profiler. The philosophy is that the profiler engine methods can be run from any thread (as they are by nature non-gui), the NetBeans module portion of profiler makes sure that any calls that end up touching UI are correctly moved to EventQueue. The other responsiveness issues will be fixed using the same approach, together with streamlining the immediate UI response to user actions and the performance of the particular task performed.
Verification of old issues.
Closing old issues.
It's back, in a build from within the last week: "AWT-EventQueue-0" prio=10 tid=0x00007ff368151000 nid=0x5ed3 waiting for monitor entry [0x00007ff353ffd000] java.lang.Thread.State: BLOCKED (on object monitor) at org.netbeans.lib.profiler.ProfilerClient.terminateTargetJVM(ProfilerClient.java:1367) - waiting to lock <0x0000000782fc6888> (a org.netbeans.lib.profiler.ProfilerClient) at org.netbeans.lib.profiler.TargetAppRunner.terminateTargetJVM(TargetAppRunner.java:464) at org.netbeans.modules.profiler.NetBeansProfiler.stopApp(NetBeansProfiler.java:1549) at org.netbeans.modules.profiler.actions.ProfilingSupport.checkProfilingInProgress(ProfilingSupport.java:145) at org.netbeans.modules.profiler.nbimpl.actions.ProfilerLauncher.config(ProfilerLauncher.java:335) at org.netbeans.modules.profiler.nbimpl.actions.ProfilerLauncher.access$000(ProfilerLauncher.java:78) at org.netbeans.modules.profiler.nbimpl.actions.ProfilerLauncher$Session.createSession(ProfilerLauncher.java:101) at org.netbeans.modules.profiler.nbimpl.actions.ProfilerLauncher.newSession(ProfilerLauncher.java:303) at org.netbeans.modules.profiler.nbimpl.actions.FileSensitivePerformer$1.run(FileSensitivePerformer.java:106) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:703) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
fixed in profiler-main: 2ee7ab384b18
the real fix is http://hg.netbeans.org/profiler-main/rev/39c517c0b153
(In reply to Petr Cyhelsky from comment #11) > the real fix is http://hg.netbeans.org/profiler-main/rev/39c517c0b153 This fix looks OK to me and can be backported to release74 branch.
Transplanted to release74 branch changeset: 271931:abca520c3bff branch: release74 user: Petr Cyhelsky <cyhelsky@netbeans.org> date: Fri Sep 06 16:02:38 2013 +0200 files: profiler/src/org/netbeans/modules/profiler/actions/ProfilingSupport.java description: #54960 - stop profiling should not be done in awt (transplanted from 39c517c0b153469774203817d076ab2705d339fa)