Bug 28159

Summary: Deadlock when creating a new Java file
Product: contrib Reporter: Petr Jiricka <pjiricka>
Component: LooksAssignee: Petr Hrebejk <phrebejk>
Status: VERIFIED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P1 Keywords: THREAD
Version: 3.x   
Target Milestone: 3.x   
Hardware: PC   
OS: Windows ME/2000   
Whiteboard:
Issue Type: DEFECT Exception Report:
Attachments: The thread dump with the deadlock
patch for CompositeLook.java

Description Petr Jiricka 2002-10-22 09:33:01 UTC
Projects branch:

This deadlock happened to me on Windows 2000 in JDK 
1.4.0_01-b03 on my private build of sources checked out on 
Oct 17.

1. In the sample project, I expanded the sources node.
2. Under examples, I created a new Java file from the 
Empty template.
3. The deadlock in the attachment occurred.
Comment 1 Petr Jiricka 2002-10-22 09:37:27 UTC
Created attachment 7732 [details]
The thread dump with the deadlock
Comment 2 Vitezslav Stejskal 2002-10-22 11:20:42 UTC
It seems that deadlock occured between DecoratorSelector and
CompositeLook. CompositeLook uses DO.getNodeDelegate to get annotated
name of the FileObject defining its contents, this name is then used
as a displayName of CompositeLook. Using DO.getNodeDelegate is
overkill, moreover it takes o.o.util.Mutex lock. I am going to attach
patch for it, please review and commit.
Comment 3 Vitezslav Stejskal 2002-10-22 11:21:58 UTC
Created attachment 7733 [details]
patch for CompositeLook.java
Comment 4 Jiri Kovalsky 2002-11-27 13:17:40 UTC
Could you Petre take a look at the attached patch ? All in all, this
is P1.
Comment 5 Petr Jiricka 2002-11-28 14:04:25 UTC
Well, the patch looks ok to me, however I don't feel I am 
the right person to ask. I don't understand looks. For 
example, I don't know at all what the getDisplayName() 
method is for. So I suggest someone else also looks at the 
fix.

Comment 6 Petr Hrebejk 2002-12-08 17:42:54 UTC
Looks like someone alredy applyied the patch, thus marking as fixed. 
(Thanks Vita)
Comment 7 Petr Jiricka 2003-07-09 16:48:50 UTC
Verified.
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo