Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 146155 - AWT blocked for minutes after startup
AWT blocked for minutes after startup
Product: editor
Classification: Unclassified
Component: Settings
All All
: P2 (vote)
: 6.x
Assigned To: Vitezslav Stejskal
Depends on: 142767
  Show dependency treegraph
Reported: 2008-09-04 10:52 UTC by Jaroslav Tulach
Modified: 2008-09-05 17:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

full thread dump (24.36 KB, text/plain)
2008-09-04 10:52 UTC, Jaroslav Tulach

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2008-09-04 10:52:26 UTC
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(
        - waiting to lock <0x9453b910> (a java.util.WeakHashMap)
        at org.netbeans.modules.editor.indent.spi.CodeStylePreferences.get(
        at org.netbeans.modules.editor.indent.api.IndentUtils.tabSize(
        at org.netbeans.modules.editor.NbEditorDocument.getTabSize(
        at org.netbeans.editor.BaseDocument.getVisColFromPos(
        - locked <0x93fd7ce8> (a java.lang.Object)
        at org.netbeans.editor.Utilities.getVisualColumn(
        at org.netbeans.editor.Utilities.debugPosition(
        at org.netbeans.editor.StatusBar$CaretListener.actionPerformed(
        at org.netbeans.editor.WeakTimerListener.actionPerformed(
        at javax.swing.Timer.fireActionPerformed(
        at javax.swing.Timer$
Comment 1 Jaroslav Tulach 2008-09-04 10:52:58 UTC
Created attachment 69036 [details]
full thread dump
Comment 2 Jan Becicka 2008-09-05 10:02:29 UTC
Vito, please take a look at it. Thanks.
Comment 3 Vitezslav Stejskal 2008-09-05 11:10:48 UTC
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)
Comment 4 Vitezslav Stejskal 2008-09-05 11:50:17 UTC
With #142767 fixed I also changed CodeStylePreferences to use readAccess, which should improve the situation.
Comment 5 Quality Engineering 2008-09-05 17:31:17 UTC
Integrated into 'main-golden', will be available in build *200809051401* on (upload may still be in progress)
User: Vita Stejskal <>
Log: #146155: AuxiliaryConfigBasedPreferences.node now uses readAccess (see #142767) and we can now use readAccess too

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo