godot icon indicating copy to clipboard operation
godot copied to clipboard

Previously freed objects shown as `<null>` in the debugger

Open RaiHormo opened this issue 8 months ago • 1 comments

Tested versions

  • Reproducible in v4.3.beta1.official [a4f2ea91a]

System information

Godot v4.3.beta1 - Windows 10.0.22631 - Vulkan (Forward+) - integrated AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.; 31.0.22013.1007) - AMD Ryzen 7 7735U with Radeon Graphics (16 Threads)

Issue description

With #73896, freed objects do not equal null anymore. When converting a project from 4.2 to 4.3 a lot of people who didn't pay attention to the changelogs and relied on this behavior might be confused why their project is broken. What might make it more confusing though is that in the debugger's stack tree variable view, freed objects are shown as having a <null> value instead of something like <Previously freed>. This behavior is also inconsistent with the remote scene view, where any freed objects will be shown as <empty>.

image image

Idealy both should be shown as <Previously freed> to make it more clear.

Steps to reproduce

  1. Make a variable containing any sort of object.
  2. use object.free()
  3. Make a breakpoint at any point after that
  4. Look at the Stack tree and remote view for that variable

Minimal reproduction project (MRP)

N/A

RaiHormo avatar Jun 01 '24 09:06 RaiHormo