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.
On windows expanded nodes in Local Variables window get collapsed after every step command. That creates a lot of inconvenience for a user who is trying to watch a class variable etc.
Please take a 2nd look. There is a known timing problem where sometimes no turner is displayed so a previously expanded node is collapsed. I don't know of any problems where an expanded node is still recognized as a struct/class but not expanded. Please see if what you're reporting is the same as the known timing problem.
No it's another issue. I use a sample that does not have problem with performance.
here it is: #include <iostream> using namespace std; class A{ public: char c; int a; int b[5]; int* arr; union un_t{ int iii; char ch; float f; } un; }; // // // int main(int argc, char** argv) { A aaa; aaa.a = 3; aaa.arr = new int[5]; for(int i= 0; i<5; i++){ aaa.arr[i] = i; aaa.b[i] = 5-i; } aaa.un.ch = 'a'; aaa.c = aaa.un.ch; for(;;){ cout<<"step"<<endl; } return (EXIT_SUCCESS); }
For the short term, can you use a test case which doesn't use unions? I'll let you know when unions are working.
I've duplicated the problem and started working on a fix. My 1st fix broke other stuff but I'll continue working on it.
Found the problem and fixed it in todays commit.
Fixed (2nd try - IssueZilla error)
Verified in 070908 build
The bug is reproducible with a new scenario: - create a new project with the following source code: #include <iostream> using namespace std; // // // class A{ int a; }; class B { int b; // A a; }; class D{ double d; }; class C : public A, public B, public D{ char c; }; int main(int argc, char** argv) { C c; cout<<"start"<<endl; cout<<"end"<<endl; return (EXIT_SUCCESS); } - do step into project - do step over to create an instance of "C" - open LV - expand all subnodes of variable "c" - set a new value for "c-><Base Class>A->a" e.g. 111 - do step over Result: All subnodes of "c" get collapsed.
I raise the priority so it's a regression compared to build 20070925 (appeared in 20070926) and now it's reproducible on all platforms.
I have a workaround which can be used if this defect is blocking other tests. Click to another debugger view (Call Stack, Breakpoints, or Watches) and then back to LV. Any missing turners should now be displayed and all expanded nodes should be expanded.
build 20071006 works fine with the original scenario but in a class function child nodes of "this" or any another element get collapsed after each step (workaround works) #include <stdio.h> class D{ double d; }; class C: public D{ float c; }; class B{ C cc; int b; public: void foo(){ //cout<<"in class B"<<endl; C c; B* pClass = this; printf("Inside B\n"); for(int i = 0; i<3; i++){ printf("step %d\n", i); } } }; int main(int argc, char** argv) { B* pb = new B(); pb->foo(); return 0; }
*** Issue 117975 has been marked as a duplicate of this issue. ***
Fixed
Fixed on all platforms except Windows. On windows (GDB 6.5) the bug is reproducible using the following scenario: - create a new C++ Application with the following source code: #include <stdlib.h> // class A{ int a; }; // class B: public A{ float b; }; // class C{ int* pI; B* pB; public: C(){ pI = new int(10); pB = new B(); } }; // int main(int argc, char** argv) { C* pC = new C(); C* cc[4]; for(int i=0; i<4; i++){ cc[i] = new C(); } return (EXIT_SUCCESS); } - build the project - set a breakpoint at "for" statement - run debugger - when the BP is reached open LV and expand "pC" node and all its subnodes - keep doing "step over" through the "for" block Result: After some steps over all nodes in LV get collapsed.
Now as it has become a Windows specific bug I downgrade the priority to P2 assuming that it should be fixed in NB 6.0.
The bug is also can be reproduced in Quote project - set a breakpoint in line 115 of quote.cc - run debugger - open LV - enter "John" in console - when the breakpoint is reached do step over Result: All nodes in LV get collapsed, turners disappear, types disappear.
Created attachment 52730 [details] Patch against version 1.49 (release60 with previously proposed updates) version
Fixed in 20071108 nightly.
verified in trunk build 20071108
Escaleted according to HR process.
Fixed reviewed by Thomas Preisler (thp).
verified in RC1 build