Unreal Crash


I’ve been seeing people have trouble up to this point I’ve been fine, but now it’s my turn I guess.

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000000

UnrealEditor_CryptRaider!UGrabber::UGrabber() [C:\Users\maver\Documents\Js Games\Unreal Projects\CryptRaider\CryptRaider\Source\CryptRaider\Grabber.cpp:18]
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Projects
UnrealEditor_Projects
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

So for I have:

  • Closed the editor
  • Deleted Binaries,Saved and Intermediate folders
  • Rebuilt from VSCode
  • Generate project files

I’d Refresh VS Code if I could get the editor open. Maybe I tried these things in the wrong order or I don’t really understand what they’re doing? <–(guilty)

Here’s the code that seems to have caused it.

#include "Grabber.h"

#include "Engine/World.h"

#include "DrawDebugHelpers.h"

#include "PhysicsEngine/PhysicsHandleComponent.h"

//#include "Math/Color.h"

// Sets default values for this component's properties

UGrabber::UGrabber()

{

    // 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;

    UPhysicsHandleComponent* PhysicsHandle = GetOwner()->FindComponentByClass<UPhysicsHandleComponent>();

    if (PhysicsHandle != nullptr)

    {

        UE_LOG(LogTemp, Display, TEXT("Got Physics Handle: %s"), *PhysicsHandle->GetName());

    }

    else

    {

        UE_LOG(LogTemp, Warning, TEXT("Physics Handle is Missing!"));

    }

   

}

It seems to match the code from the video but it also doesn’t seem to be the usual editor/coding environment problem. What foolish thing did I do?

I see it now. He scrolled down more than it appears in the video. I put this code in UGrabber rather than BeginPlay. Is that what happened? I’m rebuilding now.

1 Like

This did fix it. Somehow, I lost my grabber component in all that and had to re-add it but now I’m getting the behavior from the end of the video.

I should have caught this quicker. It makes more sense to me now.

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

Privacy & Terms