Community
Participate
Working Groups
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.
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.
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.
*** Bug 213918 has been marked as a duplicate of this bug. ***
I wonder if this could be a manifestation of bug 253216.
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.
*** Bug 231132 has been marked as a duplicate of this bug. ***
Still present in 3.5
*** Bug 295653 has been marked as a duplicate of this bug. ***
Applied patch from bug 295653. Please verify, Curtis.
Does this fix 253216 too ?
(In reply to comment #10) > Does this fix 253216 too ? No, that is a different problem.
Verified.
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.
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.