module Godot::TombstoneTracker

Overview

TombstoneTracker: Maintains a history of recently freed Godot objects to report rich diagnostic context whenever a dead pointer is accessed.

Enabled via -Dtrace_dead_pointers (or --trace-dead-pointers in Lapis CLI).

When an object is explicitly destroyed or freed, records its instance ID, class name, destruction callsite (FILE, LINE), and timestamp in a fixed-size ring buffer.

When DisposedObjectError is raised in check_alive!, looks up the tombstone and formats an actionable error message explaining where the object was destroyed.

Defined in:

libgodot/diagnostics/tombstone_tracker.cr

Constant Summary

MAX_TOMBSTONES = 256

Class Method Summary

Class Method Detail

def self.clear! : Void #

def self.enabled=(enabled : Bool) #

def self.enabled? : Bool #

def self.find(instance_id : UInt64) : Tombstone | Nil #

def self.format_disposed_message(instance_id : UInt64) : String #

def self.record_freed(instance_id : UInt64, class_name : String, file : String = __FILE__, line : Int32 = __LINE__) : Void #