Skip to content

Variables show wrong value when debugging #7696

Open
@frankvdh

Description

@frankvdh

Apache NetBeans version

Apache NetBeans 22

What happened

I am not sure of what triggers the fault, but in the Variables window, the wrong value is displayed for some variables. I have only seen this with java.awt.Point variables. In the attached screenshot, the value of this.curr.p is displayed as four different values in 4 places...

The Watch curr.p says its value is [6,3] in the summary line, yet the individual fields are x=2, y=1
In the Variables, this.curr.p shows [2, 2] in the summary line, with x=0 and y=0 for the individual fields.

The correct value is x=2, y=1

Screenshot 2024-08-26 045712

Language / Project Type / NetBeans Component

No response

How to reproduce

I am sorry, but I don't know what triggers this. I have only ever seen it in my current project in the last few weeks. I don't recall when it first happened, but certainly not 6 months ago. Possibly it was introduced in the latest Netbeans update? However, I have only seen it for java.awt.Point variables, and I have only been using that type recently.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Win11

JDK

jdk21

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

It seems intermittent... some variables display correct values, other don't. Usually looking at individual fields shows the correct values, whereas the summary line is often wrong. Creating a new Watch seems to give correct values... it is the update of a pre-existing Watch or Variable that shows the wrong value

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Java[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)debuggerkind:bugBug report or fixneeds:triageRequires attention from one of the committers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions