Random. See attachment.
Created attachment 47885 [details]
Product Version: NetBeans IDE Dev (Build 070830)
Java: 1.6.0_02-ea; Java HotSpot(TM) Client VM 1.6.0_02-ea-b02
System: Linux version 2.6.20-16-generic running on i386;
Mariane you are the owner of utilities? Not sure?
Yes, I am the owner.
According to the reporter, this deadlock has occurred once. According to bug priority guidelines, random, hardly
reproducible deadlocks should be qualified as P2 ("happens fairly often") or P3. So I lower priority of this bug to P2.
I think I found the cause and solution. Method
org.netbeans.modules.search.project.AbstractProjectSearchScope.propertyChange(...) is synchronized but it seems there is
no need for the synchronization. It is the only synchronized method among all the methods in the class and its
subclasses. So the solution is to remove the 'synchronized' modifier from the method's declaration.
Created attachment 47984 [details]
suggested patch (removed modifier 'synchronized')
Created attachment 47986 [details]
binary patch (removed modifier 'synchronized')
I have attached both source code patch and a binary patch.
To apply the binary patch, put it to subdirectory 'ide8/modules/patches/org-netbeans-modules-utilities-project' of your
NetBeans installation directory.
Do not have problem with applying source patches. But do not know why. I was not able to reproduce second time this
deadlock in a week. So if I apply a patch and does not get the deadlock it proves nothing. So probably either be sure
that it works ;) or just commit?
Fixed - committed to the trunk.