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 131088 - Local Variables not updated at breakpoint
Summary: Local Variables not updated at breakpoint
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2008-03-25 19:39 UTC by _ gordonp
Modified: 2008-03-31 12:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gordonp 2008-03-25 19:39:51 UTC
I'm using the nightly from 200803241203 to debug cnd.debugger.gdb. When I stop at a breakpoint
the Local Variables (LV) view isn't updated correctly. I first noticed this when I set a bp
after a line like "int idx = 0" and idx wasn't 0! I also had a method parameter which was
incorrectly shown. In both cases, the tooltip showed the correct value which differed from
what LV was showing.

Since then, I've stopped and LV remains empty. If I change to the call stack and back to the
LV, it gets correctly populated. When it was populated with incorrect data, it didn't get
correctly updated doing this.

If you need a test case, I can provide it. The problem is that its a *large* testcase (its
NetBeans debugging my module, which in turn is debugging a C++ project). Let me know if you
want this testcase.

I'm running on Ubuntu 7.10 using JDK 1.5.0_14.
Comment 1 Martin Entlicher 2008-03-26 09:54:30 UTC
Reproduced.
This has worked before, I'm going to find out what went wrong...
Comment 2 Marian Mirilovic 2008-03-26 09:55:43 UTC
reproducible with simple Java project 

Product Version: NetBeans IDE Dev (Build 200803250006)
Java: 1.6.0_05; Java HotSpot(TM) 64-Bit Server VM 10.0-b19
System: Linux version 2.6.22-14-generic running on amd64; UTF-8; en_US (nb)
Comment 3 Martin Entlicher 2008-03-26 12:29:56 UTC
This regression has happend between builds from Mar 17 and Mar 19. There is no build from Mar 18 available.
Comment 4 Martin Entlicher 2008-03-26 13:45:23 UTC
This was caused by:
http://hg.netbeans.org/main/rev/38b5511118d7
Specifically:
--- a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/CallStackFrameImpl.java Tue Mar 18 15:57:05 2008 +0100
+++ b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/CallStackFrameImpl.java Tue Mar 18 16:22:42 2008 +0100
@@ -256,12 +256,12 @@ public class CallStackFrameImpl implemen
if (local instanceof Local) {
Local localImpl = (Local) local;
localImpl.setFrame(this);
- localImpl.setInnerValue(v);
+ //localImpl.setInnerValue(v);
localImpl.setClassName(className);
} else {
ObjectLocalVariable localImpl = (ObjectLocalVariable) local;
localImpl.setFrame(this);
- localImpl.setInnerValue(v);
+ //localImpl.setInnerValue(v);
localImpl.setClassName(className);
}
locals[i] = local; 

We need to assure that the variable obtained from ObjectTranslation is always up-to-date.

Thus it's fixed by this changeset:   75651:bc00ca7715e0
http://hg.netbeans.org/main/rev/bc00ca7715e0
Comment 5 Jiri Vagner 2008-03-31 12:28:56 UTC
Verified

Product Version: NetBeans IDE Dev (Build 200803302302)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-b05
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
Comment 6 Jiri Vagner 2008-03-31 12:33:56 UTC
Verified also on JDK6

Product Version: NetBeans IDE Dev (Build 200803302302)
Java: 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)