HaywireInteractive / OnAllFronts-Public

UE5 MilSim FPS / RTS Game (formerly ProjectM)
MIT License
115 stars 22 forks source link

In multiplayer fix crash due to assertion in Mass code when player soldier dies #923

Closed Leroy231 closed 2 months ago

Leroy231 commented 5 months ago

Update: This may be fixed, just verify with line below.

To repro easily start a map in client net mode and run console command: pm.KillAllPossessedSoldiers


Details relevant only if issue still happens

Only happens when running under one process, but unclear why.

Things that don't explain issue:

Next steps:

Error:

Assertion failed: Pair != nullptr [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Map.h] [Line: 671]

Call stack:

    [Inline Frame] UnrealEditor-MassEntity.dll!TMapBase<UScriptStruct const *,int,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<UScriptStruct const *,int,0>>::FindChecked(const UScriptStruct *) Line 671   C++
>   UnrealEditor-MassEntity.dll!FMassArchetypeData::BatchSetFragmentValues(TArrayView<FMassArchetypeEntityCollection::FArchetypeEntityRange const ,int> EntityCollection, const FMassGenericPayloadViewSlice & Payload) Line 1187   C++
    UnrealEditor-MassEntity.dll!FMassEntityManager::BatchAddFragmentInstancesForEntities(TArrayView<FMassArchetypeEntityCollectionWithPayload const ,int> EntityCollections, const TStructTypeBitSet<FMassFragment,FMassFragmentBitSetStructTrackerWrapper,UScriptStruct> & FragmentsAffected) Line 1129    C++
    UnrealEditor-ProjectM.dll!FMassCommandAddFragmentInstances<FMassMoveTargetFragment const &>::Execute(FMassEntityManager & System) Line 382  C++
    UnrealEditor-MassEntity.dll!FMassCommandBuffer::Flush(FMassEntityManager & EntityManager) Line 153  C++
    UnrealEditor-MassEntity.dll!FMassEntityManager::FlushCommands(const TSharedPtr<FMassCommandBuffer,1> & InCommandBuffer) Line 1429   C++
    [Inline Frame] UnrealEditor-MassEntity.dll!FMassExecutionContext::FlushDeferred() Line 22   C++
    UnrealEditor-MassEntity.dll!UE::Mass::Executor::RunProcessorsView(TArrayView<UMassProcessor * const,int> Processors, FMassProcessingContext & ProcessingContext, const FMassArchetypeEntityCollection * EntityCollection) Line 124  C++
    UnrealEditor-MassEntity.dll!UE::Mass::Executor::Run(UMassProcessor & Processor, FMassProcessingContext & ProcessingContext) Line 66 C++
    UnrealEditor-MassEntity.dll!FMassProcessingPhase::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 102   C++
    UnrealEditor-Engine.dll!FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 278 C++
    UnrealEditor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool bDeleteOnCompletion) Line 1265   C++
    [Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & CurrentThread, ENamedThreads::Type) Line 866 C++
    UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 758  C++
    UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 649  C++
    [Inline Frame] UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type CurrentThread) Line 2071    C++
    UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete(const TArray<TRefCountPtr<FGraphEvent>,TSizedInlineAllocator<4,32,TSizedDefaultAllocator<32>>> & Tasks, ENamedThreads::Type CurrentThreadIfKnown) Line 2125 C++
    UnrealEditor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 556    C++
    UnrealEditor-Engine.dll!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 1583  C++
    UnrealEditor-Engine.dll!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 771 C++
    UnrealEditor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1515 C++
    UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1924 C++
    UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 531    C++
    UnrealEditor.exe!FEngineLoop::Tick() Line 5825  C++
    [Inline Frame] UnrealEditor.exe!EngineTick() Line 61    C++
    UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 188  C++
    UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 247  C++
    UnrealEditor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 298    C++
    [External Code] 
gilsonmandalogo commented 2 months ago

https://github.com/HaywireInteractive/OnAllFronts-Public/assets/6529792/f4807f44-5467-47e3-8a61-530b68f53972

It's working without any errors, tested in some different levels.