Quick answer: GameMaker tween callbacks firing on destroyed instances? Tween system holds a reference even after destroy - kill tweens on Cleanup or use instance_exists guard.

Tween a position over 2 seconds. Object destroyed at 1s. Callback fires at 2s; references invalid struct.

Kill tweens on Cleanup

tween_destroy_for(id)

Cleanup event runs before destroy. Kill all tweens attached to this instance.

Guard the callback

if instance_exists(id) { ... }

Defensive but the cleanup is better.

Use tween's owner field

Most tween libraries support an owner reference. Set it on creation; lib auto-cancels on owner destroy.

“Tweens outlive their callers. Explicit cleanup is the only safe pattern.”

Wrap tween creation in a helper that auto-registers cleanup. Boilerplate centralizes; bug class disappears.