Created attachment 100555 [details]
thread dump demonstrating infinite loop in WeakHashMap.put
Selected 2 suites projects in Open Project dialog.
after that modal dialog "Opening Projects" stands forever, projects are not opened => no way to work with IDE without killing it.
Product Version = NetBeans IDE Dev (Build 100702-a1cb2df9a24a) (#a1cb2df9a24a)
Operating System = SunOS version 5.10 running on x86
Java; VM; Vendor = 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16; Sun Microsystems Inc.
Runtime = Java(TM) SE Runtime Environment 1.6.0_14-b08
Java Home = /usr/jdk/instances/jdk1.6.0_14/jre
I'll attach thread dump demonstrating problem of infinite loop in WeakHashMap.put
I'm afraid I can't reproduce your problem, and the thread dump does not really tell me anything other than there is a problem in WeakHashMap.
There is no problems in WeakHashMap but it is not thread safe.
Please, check if you correctly access proj2Factory collection.
The problem is that you can not call even 2 map.get() without sync from different threads (because of expungeStaleEntries which modifies internal structures), so i.e. 2 accesses under org.openide.util.Mutex.readAccess can corrupt map
Of course it's difficult to reproduce, but have to reopen, because thread dump 100% indicates incorrect synchronization in code
Integrated into 'main-golden', will be available in build *201007080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jesse Glick <email@example.com>
Log: #188298: infinite loop causes unusable IDE after opening two suites projects