In my project, I fixed and protected all the pointers. However, when I startup the Unreal project, the application crashes with Access Violation code c0000005.

I reset my project by deleting all its generated folders, but I still get the same error.


Crash report summary:
Portion of log file with same error:

Any solutions?

    // Set this component to be initialized when the game starts, and to be ticked every frame.  You can turn these features
    // off to improve performance if you don't need them.
    PrimaryComponentTick.bCanEverTick = true;
    if (!PressurePlate)
        UE_LOG(LogTemp, Error, TEXT("%s missing pressure plate"), *Owner->GetName())

You’re checking the PressurePlate in the constructor, it won’t exist in the world and have an owner at that point. You need to be checking in BeginPlay or wherever you use PressurePlate.

Good catch DanM!

However, the real reason was that the Build Configuration was wrong.
I changed it to Win64 Development_Editor and things seem to be working now.
I don’t know if this is the right setting, but I can finally continue the course!

It should be.

Privacy & Terms