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.
Created attachment 119279 [details] Class reproducing a deadlock. Product Version: NetBeans IDE Dev (Build 201205090400) Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21 System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb) User directory: /home/cesilko/.netbeans/dev Cache directory: /home/cesilko/.cache/netbeans/dev Description: ============ When checking for deadlock monitors are always displayed ignoring value of "Show monitors" option. If the button is pushed, the Debugging view is refreshed and if the "Show monitors" is pushed one more time (i.e. turned off), the monitors are finally hidden. Steps to reproduce: =================== 1. Open MemoryView project and invoke "Debug File" from popup menu of DeadlockTest.java. 2. Invoke "Debug > Check for Deadlock" from main menu. 3. Verify that both Thread-0,1 threads have their "Owned Monitor: java.lang.Object (#..)" monitors displayed even though "Show monitors" button above Navigator is not pushed.
When a deadlock occurs, the "Show monitors" is set on. If the user does not change it, it's only temporary and it's reset back to the off state when the debugger session is finished. Fixed by changeset: 221375:220c30656e80 http://hg.netbeans.org/main/rev/220c30656e80
Integrated into 'main-golden', will be available in build *201205110400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/220c30656e80 User: mentlicher@netbeans.org Log: #212307: Set the SHOW_MONITORS property when a deadlock occurs. Revert it back on debugger exit, unless it's changed in between.
Product Version: NetBeans IDE Dev (Build 201205110400) Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21 System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb) User directory: /home/cesilko/.netbeans/dev Cache directory: /home/cesilko/.cache/netbeans/dev I don't probably understand the fix correctly but now the "Show monitors" option is always set on even if I turn it off after detection of deadlock. If debugger is exited, next time a deadlock is detected, the option is on again. Is this as designed Martine? Didn't you want to give user a chance to persist his preference?
Yes, this is as designed. When a deadlock is detected, "Show monitors" is always set on, so that the user can see the details for the deadlock - the monitors are usually a crucial information. If the user does not change the option, next time the debugger is run, "Show monitors" is back off. Until another deadlock is detected. Does this make sense?
OK, I agree. I was just confused by the "unless it's changed in between" explanation. Verifying then. Thanks!