Unreal keeps crashing after the implementation of DetachFromController

After I implement this.

Unreal just keeps crashing. I did read from students who had the same situation that this is caused by TakeDamage. So I added a health check at the beginning but it doesn’t help.

My guess is by detaching, I also remove the owner of the pawn which generates nullptr. How do I locate the problem and solve it?

The crash report should tell you where the crash happened and the call stack that lead to it. You could also attach the debugger by creating a config in VS Code.

image

Select C/C++ Windows Attach

image

Then switch to it and press play then select the UE4Editor

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

Privacy & Terms