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.
NetBeans IDE 4.1 [200503141900] on jdk 1.5.0_02 The views do not remember state of its nodes. When user expands some nodes, switches to another view and back to original view, only toplevel nodes are shown. This happens also when view are used as sliding windows, everytime the vies is hidden and then displayed, the nodes are all collapsed. This is serious usability bug, which must be fixed before release. For more info abut the bug severity, please see issue 42210.
I browsed daily builds of netbeans and this issue seems to popup between 01/06 and 01/09 builds. It was most probably caused by fixing the Issue #46614. From what I saw ... the problem here is that debugger computes nodes and node values (e.g. LocalVariables) on demand and asynchronously. This causes the fact that tree tables that wish to expand nodes that were previously expanded fail to find these previously expanded nodes just because those nodes are not yet available ... are being computed in some other thread. Even if it waits for those nodes to appear, there is another problem. Values of those nodes are computed asynchronously too, so asking the node for its name may return null and after 100ms may return "name" correctly. This seems to me to be very hard to fix in the current model. I will leave it to Jan to come with a reasonable solution, he knows this mode of operation better. I also noticed that TreeModelNode constructor fires a thread to compute its fields. This not only leaves nodes partially constructed but also poses the threat that "this" may easily escape the constructor ... which it escapes anyway in treeModelRoot.registerNode(object, this).
This should be already fixed in 4.2 builds. Please verify...
It is still reproducible in NetBeans IDE 4.2 build 200507191800 on jdk 1.5.0_04.
True. The expanded/collapsed state is kept during stepping and other debugger actions. But not when the views are switched.
See issue #79951, it's going to be fixed into NB 6.0.
This is fixed by the fix of issue #79951: /cvs/debuggercore/api/src/org/netbeans/api/debugger/Breakpoint.java,v <-- Breakpoint.java new revision: 1.6; previous revision: 1.5 /cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/views/ClassesView.java,v <-- ClassesView.java new revision: 1.11; previous revision: 1.10 /cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/views/SourcesView.java,v <-- SourcesView.java new revision: 1.11; previous revision: 1.10 /cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/views/ViewModelListener.java,v <-- ViewModelListener.java new revision: 1.12; previous revision: 1.11 /cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/Evaluator.java,v <-- Evaluator.java new revision: 1.12; previous revision: 1.11 /cvs/debuggercore/viewmodel/src/org/netbeans/spi/viewmodel/Models.java,v <-- Models.java new revision: 1.28; previous revision: 1.27 /cvs/debuggercore/viewmodel/src/org/netbeans/modules/viewmodel/TreeTable.java,v <-- TreeTable.java new revision: 1.26; previous revision: 1.25 /cvs/debuggercore/src/org/netbeans/modules/debugger/ui/views/View.java,v <-- View.java new revision: 1.5; previous revision: 1.4 /cvs/debuggercore/src/org/netbeans/modules/debugger/ui/views/ViewModelListener.java,v <-- ViewModelListener.java new revision: 1.14; previous revision: 1.13
I tried a similar scenario like in issue 79951 - switching between Sessions view and Local Variables view. Some variables were expanded in Local Variables view but after switch back from Sessions view the variables were collapsed. I reproduced it with debuggercore/test/qa-functional/data/debugTestProject project.
Well, collapsed/expanded state of nodes seems to be remembered correctly now. I can switch berween all views back and forth and all expansions seems to be remembered just fine. Please verify or describe the particular case which does not work. Might be already fixed by other changes. Resolving as fixed.
I am still seeing this issue with recent builds of 6.0 (early October). The symptom is that I am inspecting a complex object, descending into child nodes, when suddenly the node collapses ("un-expands"). The problem is intermittent and I do not have a repro case for it. I am wondering whether it has to do with remote debugging, but that's only a wild guess. See this thread on the NetCAT list for more information: http://www.netbeans.org/servlets/ReadMsg?list=netcat&msgNo=9164
Created attachment 51058 [details] UI gestures preceding an occurrence of this issue
I've had very similar problems with the gdb debugger module...
Might be fixed by the new Outline view which we plan to start using in the next NetBeans version. Not yet fixed due to problematic reproducibility.
Reproducible for collections (may be, for variables processed by formatters?): steps to reproduce - have an instance of (e.g.) ArrayList containing String values - in Variables view, expand the list and also expand some of the contained strings - switch to another view and back -> the list is still expanded but the strings are collapsed
It looks like this could be caused by lazy children loading. When a node sets a "Please wait" node as it's children, it stops with auto expansion, because it does not find the children nodes it looks for.