Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 200364 - The 'variables view' will sometimes show 'null' values for variables that do have a value
Summary: The 'variables view' will sometimes show 'null' values for variables that do ...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 3.6 M4   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 213918 231132 295653 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-08-17 10:00 EDT by misja CLA
Modified: 2023-01-06 09:51 EST (History)
6 users (show)

See Also:
curtis.windatt.public: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description misja CLA 2007-08-17 10:00:19 EDT
Build ID: I20070503-1400

Steps To Reproduce:
1. Put a breakpoint somewhere in your code
2. Click on the 'debug' icon in the menu bar
3. When the debugger stops at your breakpoint, sometimes the local variables that are shown in the 'variables view' will not have their correct values.



More information:
When I noticed this, a lot of variables, but not all, had as their shown values 'null'. Even local variables whose primitive type was 'float'.
When I clicked on a variable in the variable view, in the bottom pane, which shows a string representation of the variable, the correct value was shown, and as well in the variables view itself. However when I clicked on another line, the variable got the 'null' value again.

As I mentioned already, this happens only sometimes. The same code with the same breakpoints will show correct variable values at other moments.
Comment 1 Darin Wright CLA 2007-08-17 10:27:43 EDT
The build you are using is not the official 3.3 release. Please try with the official release to see if the problem still happens.
Comment 2 Martin Kunert CLA 2007-10-25 10:25:54 EDT
I'm using 3.3.1
The descriped failure still happens. If i double-click on the object its attributes are still shown as null, but in the quick-info panel under the overview the toString() value is correctly shown for all the objects attributes.
Comment 3 Darin Wright CLA 2008-11-04 14:37:39 EST
*** Bug 213918 has been marked as a duplicate of this bug. ***
Comment 4 Darin Wright CLA 2008-11-04 14:38:24 EST
I wonder if this could be a manifestation of bug 253216.
Comment 5 Ed Willink CLA 2008-11-04 15:01:08 EST
The 'duplicate' bug 213910 makes clear that the problem was present in 3.4M4, 3.4M6 and is still present in 3.4.1. bug 213910 was a reraise of bug 82850 from 3.1 days. It seems the problem has never been fixed. Hopefully bug 253216 finally gives you something to latch on to.
Comment 6 Darin Wright CLA 2009-06-09 16:36:43 EDT
*** Bug 231132 has been marked as a duplicate of this bug. ***
Comment 7 Ed Willink CLA 2009-06-26 02:02:08 EDT
Still present in 3.5
Comment 8 Darin Wright CLA 2009-11-22 12:36:40 EST
*** Bug 295653 has been marked as a duplicate of this bug. ***
Comment 9 Darin Wright CLA 2009-11-22 12:38:17 EST
Applied patch from bug 295653. Please verify, Curtis.
Comment 10 Ed Willink CLA 2009-11-22 17:52:14 EST
Does this fix 253216 too ?
Comment 11 Darin Wright CLA 2009-11-23 09:11:14 EST
(In reply to comment #10)
> Does this fix 253216 too ?

No, that is a different problem.
Comment 12 Curtis Windatt CLA 2009-11-26 11:57:18 EST
Verified.
Comment 13 Andrei Costescu CLA 2023-01-06 06:27:41 EST
I know that this issue is old, but I experienced something similar with Eclipse 2022.12 RCP.

When debugging, most variables in a larger method were shown as "null" although they were clearly not null if execution got to that breakpoint. It was as if the JVM already garbage-collected variables that were no longer touched by code of that method.

In the end I fixed it by changing the default workspace JVM (and the one used to launch the product) from JDK 17.0.2.8-openj9 to JDK 17.0.2.8-hotspot. Maybe some args when compiling/running were wrong under the hood for openj9, I don't know.

Unfortunately I cannot reproduce this is a smaller sample java project in a new workspace, so I didn't create a new issue. I'm just mentioning it in case it helps someone else.
Comment 14 Ed Willink CLA 2023-01-06 09:51:21 EST
This particular issue is verified fixed 13 years ago, but ...

There are many problems with the debugger UI. Many of those associated with the variables view are to do with poor communication with the virtual machine, sometimes nothing is shown, sometimes some variables are shown with diminished content. The 'solution' is to select another stack location and then re-select the one you actually want. This forces a refresh that usually gives a better display.

The problem is of course not reproducible since it depends on GC etc for which there are sometimes major tea break opportunities.

There is a Debugger Timeout preference under Java->Debug which I have at 10000. Making it larger may avoid loss during slow communication, but may also increase the tea break when it's just not going to work anyway.