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.
[custom trunk build with new Debugger API, version 1 and 2, JDK 1.4.2_03] I tried to create some projects with main class (there is a checkbox in the wizard). I tried this three times, and two times a deadlock occurred (once with custom build version 1, once with custom build version 2). Once the correct project was created. I am attaching full thread dumps of the deadlock. There are four full thread dumps. The first three are from version 1 and the last one is from the deadlock from version 2.
Created attachment 14132 [details] Full thread dumps of the deadlocks.
Probably BootClassPathImplementation (and also ProjectClassPathImplementation) should not fire their property changes synch from within the propertiesChanged callback, since the ProjectManager.mutex can be held here. (If everyone used the same lock, there would be no problem of course, but we have no general-purpose "configuration" lock for all of NB, so we are screwed.)
Jesse, your suggestion will solve the problem in most of the cases but not in all. The safest would be to not fire changes in AntProjectHelper under write lock. I know that they are fired under read lock only and that it is ProjectOpenedHookImpl who is calling it under write lock.
*** Issue 42240 has been marked as a duplicate of this issue. ***
Look at issue #42240, there are more comments.
Jan please check if it still happens in current builds, since I put in some changes yesterday which I think would have the effect of avoiding the situation that causes this deadlock (though not trying to solve it directly).
I tried it with 200404230645 and 200404251800 builds and the deadlock did not occur, so it seems to be fixed. Feel free to set this bug to fixed.
Fixed. The API ClassPath fires the events without holding monitor on it.
Marking as verified.