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.

Bug 142798

Summary: Deadlock when changing size of editor font
Product: editor Reporter: Marian Petras <mpetras>
Component: SettingsAssignee: issues@editor <issues>
Status: RESOLVED FIXED    
Severity: blocker Keywords: RANDOM, THREAD
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: full thread-dump

Description Marian Petras 2008-08-04 13:49:45 UTC
I wanted to change the editor font's size so I did the following:

1) Opened the Options dialogue.
2) Selected category "Fonts & Colors".
3) In the row labelled "Font:", I clicked on the button with ellipsis ([...]).

Immediately after that, the IDE hang.

JStack detected two threads involved in the deadlock - see below.
I will attach a full thread dump (produced with "jstack").

"EditorBracesMatching":
	at org.netbeans.modules.editor.settings.storage.SettingsProvider.getLookup(SettingsProvider.java:102)
	- waiting to lock <0x8bfb6e48> (a java.util.WeakHashMap)
	at org.netbeans.modules.editor.mimelookup.MimePathLookup.rebuild(MimePathLookup.java:118)
	at org.netbeans.modules.editor.mimelookup.MimePathLookup.beforeLookup(MimePathLookup.java:100)
	- locked <0x892dc390> (a org.netbeans.modules.editor.mimelookup.MimePathLookup)
	at org.openide.util.lookup.ProxyLookup$R.myBeforeLookup(ProxyLookup.java:645)
	at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:518)
	at org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:489)
	at org.openide.util.Lookup.lookupAll(Lookup.java:245)
	at org.netbeans.modules.editor.bracesmatching.MasterMatcher.findFactories(MasterMatcher.java:386)
        ...
"AWT-EventQueue-1":
	at org.netbeans.modules.editor.mimelookup.MimePathLookup.beforeLookup(MimePathLookup.java:98)
	- waiting to lock <0x892dc390> (a org.netbeans.modules.editor.mimelookup.MimePathLookup)
	at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:197)
	at org.netbeans.modules.editor.deprecated.pre61settings.KeybindingsInjector.afterLoad(KeybindingsInjector.java:97)
	at org.netbeans.modules.editor.settings.storage.StorageImpl.filterAfterLoad(StorageImpl.java:387)
	at org.netbeans.modules.editor.settings.storage.StorageImpl.load(StorageImpl.java:111)
	- locked <0x8c008ef8> (a java.lang.String)
        ...

--
NetBeans 6.5 dev. build 080804, JDK 1.6.0_10-rc-b28, Linux (Ubuntu 8.04) 32-bit, Intel PC, quad-core
Comment 1 Marian Petras 2008-08-04 13:50:23 UTC
Created attachment 66486 [details]
full thread-dump
Comment 2 Vitezslav Stejskal 2008-08-04 14:51:32 UTC
It looks like a problem in KeybindingsInjector. I could not reproduce it though.

Product Version: NetBeans IDE Dev (Build 080804)
Java: 1.6.0_10-ea; Java HotSpot(TM) Client VM 11.0-b11
System: Linux version 2.6.22-15-generic running on i386; UTF-8; en_US (nb)
Userdir: /home/vita/devel/netbeans/main2/nbbuild/testuserdir
Comment 3 Vitezslav Stejskal 2008-08-22 18:04:50 UTC
Should be better now.
http://hg.netbeans.org/main/rev/1dcd3f57c136
Comment 4 Quality Engineering 2008-08-23 05:22:06 UTC
Integrated into 'main-golden', available in build *200808230201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/1dcd3f57c136
User: Vita Stejskal <vstejskal@netbeans.org>
Log: #142798 (fixed): using KitsTracker instead of MimeLookup in KeybindingsInjector