Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 197053 - Changed variable value is set to variable with the same name in another frame
Changed variable value is set to variable with the same name in another frame
Product: cnd
Classification: Unclassified
Component: Debugger
All All
: P1 (vote)
: 7.0
Assigned To: Egor Ushakov
Depends on:
  Show dependency treegraph
Reported: 2011-03-24 17:37 UTC by Egor Ushakov
Modified: 2011-03-31 13:29 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Egor Ushakov 2011-03-24 17:37:13 UTC
struct A {
    int b;

void foo() {
   A a;
   a.b = 17;
   a.b = 18;

int main(int argc, char**argv) {
   A a;
   a.b = 1;
   return 0;

Steps to reproduce:
- step into
- expand a value so that b is visible
- do a step
a.b value will become 1
- do step into foo
a.b value remains 1
- do another step (a.b = 17;)
a.b value still remains 1
Comment 1 Egor Ushakov 2011-03-24 17:40:29 UTC
could be reproduced only if we have structure variables named the same in different frames
Comment 2 Egor Ushakov 2011-03-24 17:48:23 UTC
there is a consequence for simple types:
void foo() {
   int x = 5;

int main(int argc, char**argv) {
   int x = 2;
   return 0;

here if we change value of x inside foo it will be changed in main
Comment 3 Alexander Pepin 2011-03-25 10:57:20 UTC
This is a showstopper as a debugger breaks the expected way of execution. Does this bug has the same root cause as #196846 ?
Comment 4 Egor Ushakov 2011-03-25 11:12:41 UTC
no, they are different
Comment 5 Egor Ushakov 2011-03-28 09:31:55 UTC
fixed in trunk:
Comment 6 Egor Ushakov 2011-03-28 09:32:10 UTC
Vladimir, please review
Comment 7 Vladimir Voskresensky 2011-03-28 09:35:34 UTC
Fix reviewed. If there are no performance penalties, I'm fine with it.
Comment 8 Alexander Pepin 2011-03-28 12:05:32 UTC
verified in dev build #5040
Comment 9 Egor Ushakov 2011-03-28 12:57:48 UTC
integrated into release70:
Comment 10 Quality Engineering 2011-03-29 08:41:20 UTC
Integrated into 'main-golden', will be available in build *201103290400* on (upload may still be in progress)
User: Egor Ushakov <>
Log: fixed #197053 (Changed variable value is set to variable with the same name in another frame)
Comment 11 Alexander Pepin 2011-03-31 13:29:38 UTC
Verified in RC2 build 20110331

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo