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 28159 - Deadlock when creating a new Java file
Summary: Deadlock when creating a new Java file
Status: VERIFIED FIXED
Alias: None
Product: contrib
Classification: Unclassified
Component: Looks (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P1 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords: THREAD
Depends on:
Blocks:
 
Reported: 2002-10-22 09:33 UTC by Petr Jiricka
Modified: 2008-11-18 11:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The thread dump with the deadlock (15.25 KB, text/plain)
2002-10-22 09:37 UTC, Petr Jiricka
Details
patch for CompositeLook.java (864 bytes, patch)
2002-10-22 11:21 UTC, Vitezslav Stejskal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.