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.
Build: NetBeans IDE 6.9 (Build 201006101454) VM: Java HotSpot(TM) 64-Bit Server VM, 16.3-b01-279, Java(TM) SE Runtime Environment, 1.6.0_20-b02-279-10M3065 OS: Mac OS X User Comments: GUEST: opening a project jyeary: Running GlassFish 3.0.1 in background while working on sample Swing application in foreground. GUEST: This occured during startup Stacktrace: java.lang.StackOverflowError at org.openide.util.Mutex.leave(Mutex.java:835) at org.openide.util.Mutex$Privileged.exitReadAccess(Mutex.java:1669) at org.openide.nodes.EntrySupport$Default.getNodes(EntrySupport.java:182) at org.openide.nodes.EntrySupport$Default.getNodes(EntrySupport.java:225) at org.openide.nodes.Children.getNodes(Children.java:448) at org.openide.nodes.Node.assignTo(Node.java:339)
Created attachment 100248 [details] stacktrace
Is this interesting for Nejedlák?
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=170219
Created attachment 102002 [details] stacktrace opening Andoird project
Created attachment 103778 [details] stacktrace Opening a svn-controlled project, in wich ".svn" folder has been removed frome project root folder (although some child folders still having their ".svn" folder)
120 dups - at least P2 (reported also in NB 7.0 Beta 2)
This is probably an error in Node's usage, then an error in Nodes infrastructure. The stack overflowis generated while constructing an error message for to be thrown IllegalStateException. So something has been wrong before the StackOverFlowError. I've made the code more robust in ergonomics#14c06bbc5ed9
Integrated into 'main-golden', will be available in build *201102200501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/14c06bbc5ed9 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #187844: Sometimes StackOverflowException is thrown when we attempt to assemble the exception message. Catch it.
*** Bug 196541 has been marked as a duplicate of this bug. ***
I recently had the same problem and fixed it. Problem: The same StackOverflowError occurred when I opened my NetBeans Platform application and expanded the project tree right away before the project had the chance to fully initialize. The result of the error was that the project tree showed as empty. To be clear, if the project was allowed to fully load, i.e. the user waits some time before expanding the tree, there was no problem. Solution: The problem was in my NodeFactory.createNodes implementation for my project type. The (broken) implementation was something like this (I've simplified it to its essentials): MyFileSystem fs = ... FileObject root = fs.getRoot(); DataObject data = DataObject.find(root); Node node = dataObject.getNodeDelegate(); return NodeFactorySupport.fixedNodeList(node); Now, if the user waits for everything to load, createNodes is called only once and everything is fine. However, if the user expands the project tree before the project is loaded, createNodes is called twice: once for the user click and presumably once again when NB calls it programatically as part of its normal project load tasks. The StackOverflowError occurs during the second call. It fails because the node is already added to a parent from the first call. Therefore, my solution was to create different top-level node instances each time createNodes was called by wrapping the nodes artificially with FilterNodes. The NodeFactory.createNodes javadoc doesn't say anything about not allowing shared node instances for top-level nodes. Also, that doesn't really seem right to require that given that each DataObject is supposed to have only one node instance by design. I'm not familiar enough with the code to judge the effort involved in making changes, but in my opinion, my first implementation of createNodes was reasonable and should have worked. Given the number of duplicates this bug has, I think I'm not alone. :) P.S. I hope it's cool to comment on a resolved bug. This just seemed the best place for this.