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.

Bug 142078

Summary: IllegalArgumentException: A node selection cannot contain nodes (h2) not underneath the root (null).
Product: web Reporter: Marek Fukala <mfukala>
Component: HTML EditorAssignee: Torbjorn Norbye <tor>
Status: RESOLVED FIXED    
Severity: blocker CC: jsedek, mfukala, mschovanek, pjiricka
Priority: P2 Keywords: RANDOM, THREAD
Version: 6.x   
Hardware: Macintosh   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Marek Fukala 2008-07-29 14:52:21 UTC
During editing of gsf based languages with navigator support following exceptions is randomly thrown:

IllegalArgumentException: A node selection cannot contain nodes (h2) not underneath the root (null).

See issue #128452 and all related issues for more information.

java.lang.IllegalArgumentException: A node selection cannot contain nodes (h2) not underneath the root (null).
	at org.openide.explorer.ExplorerManager.checkUnderRoot(ExplorerManager.java:561)
	at org.openide.explorer.ExplorerManager.access$300(ExplorerManager.java:87)
	at org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.checkArgumentIsValid(ExplorerManager.java:232)
	at org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.run(ExplorerManager.java:265)
	at org.openide.util.Mutex.readAccess(Mutex.java:362)
	at org.openide.explorer.ExplorerManager.setSelectedNodes(ExplorerManager.java:272)
	at org.netbeans.modules.gsfret.navigation.ClassMemberPanelUI.selectElementNode(ClassMemberPanelUI.java:171)
	at org.netbeans.modules.gsfret.navigation.ClassMemberPanel.selectElement(ClassMemberPanel.java:97)
	at org.netbeans.modules.gsfret.navigation.CaretListeningTask.run(CaretListeningTask.java:77)
	at org.netbeans.modules.gsfret.navigation.CaretListeningTask.run(CaretListeningTask.java:57)
	at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1216)
	...
Comment 1 Marek Fukala 2008-07-29 14:55:59 UTC
Tor, this looks like some GSF navigator threading issue if t_h is right that this is not explorer problem. Can you
please look at that?
Comment 2 Torbjorn Norbye 2008-08-01 17:35:32 UTC
This (and some other related functionality problems) should be fixed now, as of changeset 03071a0eb8ed.  (And some other
navigator related problems in 1d8b57cce2e0, 50bded4ca7b5, 153928aad54a).

This navigator bug has been there since the beginning (NetBeans 6.0).  The reason it suddenly spiked in number of
exception submissions recently was related to the various node performance changes elsewhere. But that was just the
exception stacktrace. I uncovered several functionality related problems where for example switching files a lot would
eventually cause the navigator to stop updating the navigator selection based on the caret.