@Jambax unfortunately I don’t think that’s the case as I do a check on controller first to make sure it’s not nullptr.
All of this happens, and then the game errors out specifically when I try to access SidekickAIControllerClass.
if (Controller)
{ Controller->Sidekick->GetController()->UnPossess();
UClass* Example = Controller->SidekickAIControllerClass;
Controller->Sidekick->AIControllerClass = Controller->SidekickAIControllerClass.LoadSynchronous();
Controller->Sidekick->SpawnDefaultController();
}
I’m really thinking this is a replication related error as this is the output of the crash. It mentions OnlineSubsystemUtils, and line 86 is the line where it tries to set AIControllerClass to SidekickAIControllerClass:
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000
UE4Editor_Engine
UE4Editor_MultiplayerTemplate!ATrainerController::SpawnSidekick_Implementation() [A:\Project Tall Grass\Test Multiplayer\Source\MultiplayerTemplate\Trainer\TrainerController.cpp:86]
UE4Editor_MultiplayerTemplate!ATrainerController::execSpawnSidekick() [A:\Project Tall Grass\Test Multiplayer\Intermediate\Build\Win64\UE4Editor\Inc\MultiplayerTemplate\TrainerController.gen.cpp:44]
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_OnlineSubsystemUtils
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll
Is there anything else I could check?