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.
Build from 4Sep, 2008, blocks AWT after startup waiting in CodeStylePreferences. "AWT-EventQueue-1" prio=10 tid=0x082dc000 nid=0x27c6 waiting for monitor entry [0x8cafe000..0x8caff0b0] java.lang.Thread.State: BLOCKED (on object monitor) at org.netbeans.modules.editor.indent.spi.CodeStylePreferences.get(CodeStylePreferences.java:180) - waiting to lock <0x9453b910> (a java.util.WeakHashMap) at org.netbeans.modules.editor.indent.spi.CodeStylePreferences.get(CodeStylePreferences.java:103) at org.netbeans.modules.editor.indent.api.IndentUtils.tabSize(IndentUtils.java:122) at org.netbeans.modules.editor.NbEditorDocument.getTabSize(NbEditorDocument.java:144) at org.netbeans.editor.BaseDocument.getVisColFromPos(BaseDocument.java:2108) - locked <0x93fd7ce8> (a java.lang.Object) at org.netbeans.editor.Utilities.getVisualColumn(Utilities.java:647) at org.netbeans.editor.Utilities.debugPosition(Utilities.java:1100) at org.netbeans.editor.StatusBar$CaretListener.actionPerformed(StatusBar.java:570) at org.netbeans.editor.WeakTimerListener.actionPerformed(WeakTimerListener.java:85) at javax.swing.Timer.fireActionPerformed(Timer.java:271) at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
Created attachment 69036 [details] full thread dump
Vito, please take a look at it. Thanks.
It's still the same story, which I'm pretty sure Jarda already knows. In short: pre-project formatting settings -> need ProjectManager.mutex() -> when opening projects somebody else holds the mutex -> we can't open a document, render it or do pretty much anything else and end up blocking AWT. The real question is 'do we need to writeLock the mutex'? Maybe not, see issue #142767. Is anybody bold enough to make the change suggested in #142767. I guess not, so it's probably gonna have to be me. (puke)
With #142767 fixed I also changed CodeStylePreferences to use readAccess, which should improve the situation. http://hg.netbeans.org/main/rev/917a3b0e6eb2
Integrated into 'main-golden', will be available in build *200809051401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/917a3b0e6eb2 User: Vita Stejskal <vstejskal@netbeans.org> Log: #146155: AuxiliaryConfigBasedPreferences.node now uses readAccess (see #142767) and we can now use readAccess too