Hey, when I try to use the method UDestructibleComponent::SetDestructibleMesh() my game crashes on packaged version. It works fine in editor and also in standalone.
Here is how code goes:
ConstructorHelpers::FObjectFinder<UDestructibleMesh> FinderBody(PLAYER_DESTRUCTIBLE_BODY);
if(FinderBody.Succeeded())
PlayerMesh = FinderBody.Object;
if(IsValid(PlayerMesh))
DestructibleBody->SetDestructibleMesh(PlayerMesh);
I know the FObjectFinder is finding my object, I’ve already debugged it.
Here is what the log prints on crash:
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: === Critical error: ===
[2018.02.25-15.03.45:548][ 0]LogWindows: Error:
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: Fatal error!
[2018.02.25-15.03.45:548][ 0]LogWindows: Error:
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000
[2018.02.25-15.03.45:548][ 0]LogWindows: Error:
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x000000009822B5AE StarTrix.exe!UDestructibleComponent::SetDestructibleMesh() []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x0000000095603873 StarTrix.exe!AStarTrixCharacter::AStarTrixCharacter() [f:\unreal projects\startrix\source\startrix\startrixcharacter.cpp:184]
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x0000000095DDA9BC StarTrix.exe!AActor::DispatchBeginPlay() []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x0000000095FDFA7F StarTrix.exe!AWorldSettings::NotifyBeginPlay() []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x0000000095E45ED1 StarTrix.exe!AGameStateBase::HandleBeginPlay() []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x0000000095FCC44E StarTrix.exe!UWorld::BeginPlay() []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x0000000095F5D42E StarTrix.exe!UEngine::LoadMap() []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x0000000095F10062 StarTrix.exe!UEngine::Browse() []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x0000000095E67B5E StarTrix.exe!UGameInstance::StartGameInstance() []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x0000000095615083 StarTrix.exe!FEngineLoop::Init() []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x0000000095626582 StarTrix.exe!GuardedMain() []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x00000000956266FA StarTrix.exe!GuardedMainWrapper() []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x0000000095632FC8 StarTrix.exe!WinMain() []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x0000000098BBBC4E StarTrix.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283]
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x00000000F1331FE4 KERNEL32.DLL!UnknownFunction []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x00000000F32DEF91 ntdll.dll!UnknownFunction []
[2018.02.25-15.03.45:548][ 0]LogWindows: Error: [Callstack] 0x00000000F32DEF91 ntdll.dll!UnknownFunction []