Your Pawn isn’t null: it has an address. IsValidLowLevel() checks for exactly this condition (i.e. this != nullptr) and that the class exists, i.e. that the object is “known” by the reflection system (registered to the garbage collector & such).
But as its name implies, this is a fairly low-level check: your object could be pending destruction for instance.
For your usage it seems better to test IsValid(), which does both the null and the pending kill tests.
If either PendingKill() or UnreacheableOrPendingKill() returns true there lies your problem: the Pawn instance you’re inspecting is marked for deletion and as such can no longer be processed - hence your crash.
No other UObject maintains a reference to your pawn so the garbage collector decides it has to be deleted.
You can probably trace the reason for deletion by having suitable traces or breakpoint in the Pawn class deletion callback method (EndPLay,(), OnEndPLay() or any other similar one).
I’m experiencing some high level sorcery within Unreal engine now.
How is it that a null object passed an IsValidLowLevel , and proceed to successfully retrieve data using Interface.
And then proceed to crash because it’s AccessedNone
Here’s the execution. The main function is IsAlive.
Apparently the Pawn successfully passes IsValidLowLevel, proceeds to execute an interface.
Successfully retrieve the return value. And proceeds to crash afterwards.
The autos in the debugger shows that Pawn is Null. Which puzzles me.