It always crash when i press the play button

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000000001c8

UnrealEditor_Engine
UnrealEditor_StealThenJustEscape!AIPlayer::BeginPlay() [C:\Users\PC\Desktop\Blender and Unreal Projects\StealThenJustEscape\Source\StealThenJustEscape\IPlayer.cpp:31]
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

You are probably dereferencing a null pointer. This video from Bret “The Hitman” Hart explains it:

1 Like

but how can I solve it?

Without knowing what your code looks like, that’d be difficult to say. The line causing the issue is in IPlayer.cpp on line 31. Try checking your pointers before accessing them, by encapsulating it in an if-statement. Taking an example of something from some code I’ve written before:

Instead of just accessing my UHUD_Widget* directly, like so:
HUD->RemoveFromParent();

I instead do this:

if (HUD) {
		HUD->RemoveFromParent();
}

This way my code is only executed if HUD isn’t a null-pointer.
As for why your pointer may be a null-pointer? Well, you’ll need to share more of your code if you want help with that.

I already solved it but still thank for your answer

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.