Quick answer: Unreal Blueprint construction script triggering on a deleted instance during editor undo? Undo re-runs construction; guard with IsValid checks on referenced components.
Editor undo of an actor delete crashes Unreal. Construction script accesses a component that wasn't restored yet.
Guard with IsValid
if (IsValid(MyComp)) {
MyComp->Setup();
}IsValid checks for both null and pending-kill. Both can occur in editor undo states.
Or use OnConstruction guard
Override OnConstruction in C++ with a check: if (HasAnyFlags(RF_NeedInitialization)) return;. Skips construction on partial undo states.
Repro with the undo macro
Editor > Editor Preferences > Experimental > Undo Stress Test. Hammers undo/redo; catches construction bugs at the source.
“Construction script is the dirtiest part of Unreal's lifecycle. Defensive code is the rule.”
If you find yourself adding IsValid checks everywhere, consider moving setup to BeginPlay. Construction is for editor preview; runtime is where state should live.