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 201412

Summary: Deadlock adding hints
Product: editor Reporter: Jesse Glick <jglick>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED FIXED    
Severity: normal CC: mmirilovic
Priority: P2 Keywords: THREAD
Version: 7.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Thread dumps

Description Jesse Glick 2011-08-29 18:53:24 UTC
Created attachment 110270 [details]
Thread dumps

While testing changes to a UpToDateStatusProviderFactory, I suddenly encountered a deadlock not apparently involving my own code.
Comment 1 Jesse Glick 2011-08-29 19:07:48 UTC
Just happened to me again, apparently at random. I think calling QuietEditorPane.setFont from off EQ is at least part of the problem.
Comment 2 Jesse Glick 2011-08-29 19:26:58 UTC
I tried to put in a hotfix: core-main #401db37afd23; please review.
Comment 3 Quality Engineering 2011-08-30 14:21:21 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/401db37afd23
User: Jesse Glick <jglick@netbeans.org>
Log: Attempted hotfix for deadlock #201412.
Comment 4 Jan Lahoda 2011-10-10 16:41:15 UTC
Mila, any idea?
Comment 5 Miloslav Metelka 2011-10-18 13:28:58 UTC
It's mine - accessing AWT treelock oustide EDT:

"HintsController worker" daemon prio=10 tid=0x6763ac00 nid=0x115e waiting for monitor entry [0x666f9000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at java.awt.Component.setFont(Component.java:1798)
	- waiting to lock <0x7c91cb10> (a java.awt.Component$AWTTreeLock)
	at java.awt.Container.setFont(Container.java:1554)
	at javax.swing.JComponent.setFont(JComponent.java:2723)
	at org.openide.text.QuietEditorPane.setFont(QuietEditorPane.java:132)
	at org.netbeans.modules.editor.lib2.view.DocumentViewOp.updateDefaultFontAndColors(DocumentViewOp.java:809)
	at org.netbeans.modules.editor.lib2.view.DocumentViewOp.checkSettingsInfo(DocumentViewOp.java:685)
	at org.netbeans.modules.editor.lib2.view.DocumentViewOp.checkViewsInited(DocumentViewOp.java:503)

I'll fix it.
Comment 6 Miloslav Metelka 2011-11-11 14:22:13 UTC
http://hg.netbeans.org/jet-main/rev/18a36daaf2af
Comment 7 Quality Engineering 2011-11-12 16:30:08 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/18a36daaf2af
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #201412 - Deadlock adding hints.