Physix crashes

Hi, I have had some physics crashes, and wasn’t able to correct thoses yet, any help would be much appreciated:

When Launching my game with more than one player, the whole editor crashes instantly with this stack:

Access violation - code c0000005 (first/second chance not available)

""

PhysX3PROFILE_x64
PhysX3PROFILE_x64
PhysX3PROFILE_x64
PhysX3PROFILE_x64
PhysX3PROFILE_x64
PhysX3PROFILE_x64
UE4Editor_Engine!GeomOverlapMultiImp_PhysX<0>() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\collision\physxcollision.cpp:1564]
UE4Editor_Engine!<lambda_9c9fd22512fc351a24410086e7ddb5fe>::operator()() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\physicsengine\bodyinstance.cpp:4195]
UE4Editor_Engine!FBodyInstance::ExecuteOnPhysicsReadOnly() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\physicsengine\bodyinstance.cpp:2870]
UE4Editor_Engine!FBodyInstance::OverlapMulti() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\physicsengine\bodyinstance.cpp:4213]
UE4Editor_Engine!USkeletalMeshComponent::ComponentOverlapMultiImpl() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\skeletalmeshcomponentphysics.cpp:1925]
UE4Editor_Engine!UWorld::ComponentOverlapMulti() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\collision\worldcollision.cpp:449]
UE4Editor_Engine!UPrimitiveComponent::UpdateOverlaps() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\components\primitivecomponent.cpp:2402]
UE4Editor_Engine!USkeletalMeshComponent::PostAnimEvaluation() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:1224]
UE4Editor_Engine!USkeletalMeshComponent::CompleteParallelAnimationEvaluation() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\classes\components\skeletalmeshcomponent.h:1254]
UE4Editor_Engine!FParallelAnimationCompletionTask::DoTask() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:104]
UE4Editor_Engine!TGraphTask<FParallelAnimationCompletionTask>::ExecuteTask() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\public\async\taskgraphinterfaces.h:779]
UE4Editor_Core!FTaskThread::ProcessTasks() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\async\taskgraph.cpp:539]
UE4Editor_Core!FTaskThread::ProcessTasksUntilQuit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\async\taskgraph.cpp:340]
UE4Editor_Core!FTaskGraphImplementation::WaitUntilTasksComplete() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\async\taskgraph.cpp:1140]
UE4Editor_Engine!FTaskGraphInterface::WaitUntilTaskCompletes() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\public\async\taskgraphinterfaces.h:212]
UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\ticktaskmanager.cpp:285]
UE4Editor_Engine!FTickTaskManager::RunTickGroup() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\ticktaskmanager.cpp:1206]
UE4Editor_Engine!UWorld::RunTickGroup() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\leveltick.cpp:701]
UE4Editor_Engine!UWorld::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\leveltick.cpp:1150]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\editorengine.cpp:1347]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\unrealedengine.cpp:361]
UE4Editor!FEngineLoop::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launchengineloop.cpp:2427]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32
ntdll

I tried disabling the collisions on the pawn, adding more player start, but nothing worked, sometime the game still launches but the two player are spawned exactly at the same place, overlapping each other.

I also tried to check my physix collision setup by entering pxvis collision in console while playing alone, but each time I execute this command, the whole editor crash too (after freezing for 20 seconds). This might be an out of memory crash as I see my memory usage spikes up to 100% while the editor is freezing after issuing the command.

No minidump found for this crash.

These crashes might be related to the fact that my 4wheel vehicle isn’t properly setup, (I have a mesh with three wheels, but I can’t make a 3 wheel vehicle → )

Thanks for reading

Hello ,

Have you tried disabling the spawning for your pawns and then starting the game with multiple players to see if that is related to the crash? Also, would it be possible for you to upload a copy of the project so that I can take a look at the problem myself?

Thanks for the reply :slight_smile: I am uploading my project right now, I’ll send you the link via private message when it’s done. The game seems to work fine when not using my “Carpawn” (airplane pawn c++ class based on 4Wheeledvehicle class). I tried with default pawn and the players can move and see each other moving.

I sent you the link of a copy of the project via ue4 forum as I can’t find private messages here. Thanks for your help :slight_smile:

Thank you for the project. I can definitely see why pxvis collision would cause you to crash as it’s bound to do that with such a large landscape in your level, as it is going to try to show all of the collision for that as well.

As for the original crash, it actually didn’t happen for me with 2 players once I deleted the second PlayerStart, which obviously resulted in the two plane’s colliding with each other. It also seems like the issue revolves around your plane asset itself and the way you’re spawning it. I’m getting multiple warnings about the second CarPawn being outside of the world’s bounds and the plane not having Simulate Physics set to true.

thanks for your help, I was able to debug the collisions in a blank level and correct my wehicle setup :slight_smile:

For the original crash, I also thinks it may be related to spawning the actor.

  • with 2 “player starts” I get a crash about physix.

  • with one player start the two actors
    are colliding each other but no crash.

  • with the default pawn set to spectator and the airplane pawn set
    to autoposses the first player, all works fine. The reverse is not true, the second player isn’t able to posses the airplane.

  • with some blueprints in the game mode and the player controller that take
    care of spawning the airplane actors in random location and possesing the
    players, the first player always works, but the second never posses
    the plane.

  • With a dedicated server, the two players never posses the airplane.

All these observations leads me to thinking that my problem is more that i can’t make remote players posses my airplane pawn - other pawns works fine - So I come to the conslusion that either my respawn/posses logic is wrong or my airplane pawn has something wrong in it that prevents that. Will be searching more about theses two hypothesis, thanks a lot for your help :slight_smile:

Update: I tried my blueprint setup “to spawn airplane pawns and posses it for each player” on a new level and it’s working fine, no crashes or overlapping. there is definitely something wrong with my map, as it was a protyping map I think I’ll just continue with a new one. Apart from this this the physics are plain wrong for the client and the two players have very low framerate (GPU running at only 10% and CPU at 50% during tests). But these are non relevant the the issue i posted here, some more work to do :slight_smile: Thanks again for your help!