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.
after I tried to add a new code template, for taking the new setting into effect, I tried restart the IDE, then it halted at "Opening Main Window...", I have to kill the halted process through windows process manager, and tried to restart it again, it just halted again... until I delete the 'Windows2Local' dir manually under the config directory.
Could you please attach thread dump? http://wiki.netbeans.org/GenerateThreadDump
Created attachment 69961 [details] thread dump file.
Reassigning to editor for evaluation.
Reassigning to gsf.
Vita, any ideas? It looks from the thread dump like the problem is that the EditorRegistry is being accessed from multiple threads simultaneously. I'm not sure what it would be blocking on... perhaps the static initialization block? Is there a way for me to fix this? I've always assumed the EditorRegistry could be accessed from any thread (I've replaced old code calling getOpenedPanes on editor cookies (which only worked on the event dispatch thread) with calls to EditorRegistry.lastFocusedComponent()). Would it be best to add a EditorRegistry call from my ModuleInstall perhaps to make sure it's initialized without contest the first time? Of course, that's going to trip off the startup-class-whitelist alarm... I suppose I could synchronize on something in my module - but I also see a call into EditorRegistry from the java.source thread as well so the potential for conflict is still there... I'm reassigning this to the editor library for further evaluation; if I'm doing something wrong please assign it back and apologies in advance.
IMHO the best solution will be ER will fire outside of a lock. I will attempt to fix it in this way.
I'm pretty sure I fixed this already some time ago. I'm trying to find the original issue to make this a duplicate. Tor, you are right, the problem is in ER and it really blocks on the static initialization (ie. the classloading and ER locks clash). Mila, ER no longer fires events when holding its own lock. exlons, could you please try newer build (eg the latest daily (dev) build)? Thanks
*** This issue has been marked as a duplicate of 146336 ***
I tried the latest build, the issue seems already gone, thanks.