Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 147290 - IDE halted while "Opening Main Window..."
IDE halted while "Opening Main Window..."
Status: RESOLVED DUPLICATE of bug 146336
Product: editor
Classification: Unclassified
Component: -- Other --
PC All
: P2 (vote)
: 6.x
Assigned To: Vitezslav Stejskal
Depends on:
  Show dependency treegraph
Reported: 2008-09-15 17:06 UTC by exlons
Modified: 2008-09-22 18:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

thread dump file. (25.74 KB, text/plain)
2008-09-16 16:36 UTC, exlons

Note You need to log in before you can comment on or make changes to this bug.
Description exlons 2008-09-15 17:06:39 UTC
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.
Comment 1 Peter Pis 2008-09-15 17:13:51 UTC
Could you please attach thread dump?
Comment 2 exlons 2008-09-16 16:36:07 UTC
Created attachment 69961 [details]
thread dump file.
Comment 3 Peter Pis 2008-09-16 22:04:50 UTC
Reassigning to editor for evaluation.
Comment 4 Dusan Balek 2008-09-17 09:03:25 UTC
Reassigning to gsf.
Comment 5 Torbjorn Norbye 2008-09-22 05:19:47 UTC
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.
Comment 6 Miloslav Metelka 2008-09-22 10:23:48 UTC
IMHO the best solution will be ER will fire outside of a lock. I will attempt to fix it in this way.
Comment 7 Vitezslav Stejskal 2008-09-22 11:25:31 UTC
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
Comment 8 Vitezslav Stejskal 2008-09-22 11:28:02 UTC

*** This issue has been marked as a duplicate of 146336 ***
Comment 9 exlons 2008-09-22 18:51:35 UTC
I tried the latest build, the issue seems already gone, thanks.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo