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.
The work inside registerJsClassPathIfNeeded is performed in EDT, it involves InstalledFileLocator which does many file system requests which may be rather slow, during that work EDT is blocked and IDE may freeze. Is it possible to use another thread not EDT?
Are you sure that you have it called from AWT EDT? At the first glance it didn't looked to me so from the stackTrace, so I also tried directly isEDT() and I didn't have it called from EDT any time. Do you have steps how to reproduce that? How to get this called from EDT? Thanks...
well, I'm not talking about registerJsClassPathIfNeeded itself, but inside it all useful work is done inside SwingUtilities.invokeLater which is definitely EDT
(In reply to comment #2) > well, I'm not talking about registerJsClassPathIfNeeded itself, but inside it > all useful work is done inside SwingUtilities.invokeLater which is definitely > EDT Sorry Egor, as I wrote I took a look on that just quickly before so I also overlook that the pain for you is what is called inside the method and not where is called that method. You know, it's not easy to find proper place to register JS classpath since JS doesn't need any specific project type, one time it's just needed. ;) I moved the registration to the lexer getter of the language - it should establish call the first registration when really required (so it isn't called for C++ at all for now). Let's wait how it will behave to all users which needs the JS. It looked to me well also in languages which can embed it for now so I hope we will be able to stay with that solution. Fixed in web-main #536fe324d2c0.
Thanks! now it really does not affect c++. But I believe the bug is still there - fs is still accessed from EDT. Is it really a requirement to use SwingUtilities.invokeLater here? Can any other thread do the job?
Integrated into 'main-golden', will be available in build *201209220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/536fe324d2c0 User: Martin Fousek <marfous@netbeans.org> Log: #218708 - Accessing file system in EDT: registerJsClassPathIfNeeded
(In reply to comment #4) > But I believe the bug is still there - fs is still accessed from EDT. Is it > really a requirement to use SwingUtilities.invokeLater here? Can any other > thread do the job? It broke about 100+ JS tests for first time so I didn't take it enough of care since it looked to me resolved for C++ troubles... I spent a more time on that now and it looks to me that the JavaScript tests had above all wrongly registered CP, so I correct them and everything looks to be working well - also when the CP registration happens on the background in the RP. Manual testing in IDE with empty userdir worked properly to me as well. Fixed in web-main #828b172500a3.
Mess in bug id http://hg.netbeans.org/main-golden/rev/828b172500a3 gets in to gold in bug #218706
Sorry for confusion, the fix should be already in trunk but I placed wrong bug ID into the commit message.