UDestructibleComponent->SetDestructibleMesh() causing read access violation in C++
I'm having a strange issue trying to assign a UDestructibleMesh to a UDestructibleComponent in C++. I'm using APEX destruction and it works well in the editor but when I try to package the game it crashes on launch. The strangest thing is that the stack trace is calling out the error as a Read Access Violation at address 0x00000000 and the stack trace is pointing to the return address of the initializer that I setup the mesh in rather than the actual call to UDestructibleComponent->SetDestructibleMesh().
The code thats causing the issue is the initializer for a class that extends AActor:
ABaseShipDestruction::ABaseShipDestruction() { PrimaryActorTick.bCanEverTick = true;
this->DestructionMesh = CreateDefaultSubobject<UDestructibleComponent(TEXT("Destruction Component"));
ConstructorHelpers::FObjectFinder<UDestructibleMesh> MeshAsset(TEXT("/Game/Models/GlassifierSmall_DM.GlassifierSmall_DM")); if (MeshAsset.Succeeded() && this->DestructionMesh != nullptr) { this->DestructionMesh->SetDestructibleMesh(MeshAsset.Object); } }
I've also tried the object loader as well but with the same results. The strange thing is that when I inspect the MeshAsset.Object the ApexDestruction pointer is null. This is the same when using the object loader as well and makes me think there's an issue with APEX. I'm using UE4.25. Has anyone assigned destructible meshes in C++ before or had a similar issue?
Here's the paste of the stack trace and exception info: https://pastebin.com/50CFGBuA
Thanks