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.
I've only moved a cursor in editor, in this moment the code was valid and saved.
Created attachment 18098 [details] stacktrace
ehucka: You probably moved your cursor in java file. That is likely to be bug in java, as openide is not reponsible for someone trying to select a node that is not under root of an explorer.
I have no idea how to find the cause of this bug having just this short stacktrace. What file were you editing? Did it contain JDK 1.5 features (like enums or annotations)? I am asking because we had a bug which caused that nodes that were not in the explorer were set as active. Yarda, could you please explain better, what the exception means/how we could find out what the cause could be?
I am suspicious against bugs just assigned to core when they happen somewhere else, however in this case I am really not aware of any possible fix in java module.
Imho the problem is in wrong synchronization of ExplorerManager. It checks whether its nodes are under root, then it calls setSelectedNodes where the check is done one more and it fails. I suggest to wrap all code like this into Children.MUTEX.readAccess.
Created attachment 18294 [details] Fix with a basic test
Integrated after a bit of refactoring. openide/src/org/openide/explorer/ExplorerManager.java,v1.49 openide/test/unit/src/org/openide/explorer/ExplorerManagerTest.java,v1.1
*** Issue 48885 has been marked as a duplicate of this issue. ***
verified