Search Unity

PhysX crash in built player: The specified module could not be found

Discussion in 'Physics' started by dgoyette, Jan 9, 2019.

  1. dgoyette


    Jul 1, 2016
    This will probably be difficult to isolate into a test case I can submit, so I wanted to see if this was a known issue before going down that path. The issue is that I'm getting a PhysX- (or maybe job-) related crash that only occurs when the player is not focused.

    Here's an excerpt of the crash log stack trace:

    Stack Trace of Crashed Thread 10432:
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 0000000080000000)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 0000000080000000)
    0x0000000080000000 ((<unknown>)) (function-name not available)
    0x00007FFC2C06A2C7 (UnityPlayer) CastFilter::preFilter
    0x00007FFC2D218C88 (UnityPlayer) MultiQueryCallback<physx::pxRaycastHit>::invoke
    0x00007FFC2D414F96 (UnityPlayer) processBucket<0>
    0x00007FFC2D41659B (UnityPlayer) stab<0>
    0x00007FFC2D41F364 (UnityPlayer) physx::Sq::BucketPrunerCore::raycast
    0x00007FFC2D425181 (UnityPlayer) physx::Sq::ExtendedBucketPruner::raycast
    0x00007FFC2D41F2B8 (UnityPlayer) physx::Sq::AABBPruner::raycast
    0x00007FFC2D2058AE (UnityPlayer) physx::NpSceneQueries::multiQuery<physx::pxRaycastHit>
    0x00007FFC2D21ABB1 (UnityPlayer) physx::NpSceneQueries::raycast
    0x00007FFC2C080BE5 (UnityPlayer) RaycastCommandJob
    0x00007FFC2C8156E9 (UnityPlayer) JobQueue::Exec
    0x00007FFC2C817684 (UnityPlayer) JobQueue::processJobs
    0x00007FFC2C81B2E3 (UnityPlayer) JobQueue::WorkLoop
    0x00007FFC2C9AEC2F (UnityPlayer) Thread::RunThreadWrapper
    0x00007FFCABEF3034 (KERNEL32) BaseThreadInitThunk
    0x00007FFCAC063691 (ntdll) RtlUserThreadStart

    Stacks for Running Threads:

    Call Stack for Thread 15852:
    0x00007FFCAC08AA24 (ntdll) NtWaitForSingleObject
    0x00007FFCA91B9252 (KERNELBASE) WaitForSingleObjectEx
    0x00007FFC2C81B11B (UnityPlayer) JobQueue::WaitForJobGroupID
    0x00007FFC2C809683 (UnityPlayer) CompleteFenceInternal
    0x00007FFC2CBF7D8F (UnityPlayer) JobHandle_CUSTOM_ScheduleBatchedJobsAndComplete
    0x00000174014C4401 (Mono JIT Code) <unknown class>.<unknown method>()
    0x0000017448B66B13 (Mono JIT Code) <unknown class>.<unknown method>()
    0x00000174014C386B (Mono JIT Code) <unknown class>.<unknown method>()
    0x00000174014BD7D3 (Mono JIT Code) <unknown class>.<unknown method>()
    0x00000174014BD4DB (Mono JIT Code) <unknown class>.<unknown method>()
    0x000001743FD2E5E8 (Mono JIT Code) <unknown class>.<unknown method>()
    0x00007FFC33FCBE4B (mono-2.0-bdwgc) mono_get_runtime_build_info
    0x00007FFC33F51E32 (mono-2.0-bdwgc) mono_perfcounters_init
    0x00007FFC33F5AE3F (mono-2.0-bdwgc) mono_runtime_invoke
    0x00007FFC2CB822B4 (UnityPlayer) scripting_method_invoke
    0x00007FFC2CB7F440 (UnityPlayer) ScriptingInvocation::Invoke
    0x00007FFC2CB688E9 (UnityPlayer) MonoBehaviour::CallMethodIfAvailable
    0x00007FFC2CB68AA3 (UnityPlayer) MonoBehaviour::CallUpdateMethod
    0x00007FFC2C679CE0 (UnityPlayer) BaseBehaviourManager::CommonUpdate<FixedBehaviourManager>
    0x00007FFC2C680E4F (UnityPlayer) FixedBehaviourManager::Update
    0x00007FFC2C8E5E62 (UnityPlayer) `InitPlayerLoopCallbacks'::`2'::FixedUpdateScriptRunBehaviourFixedUpdateRegistrator::Forward
    0x00007FFC2C8D708E (UnityPlayer) ExecutePlayerLoop
    0x00007FFC2C8D715F (UnityPlayer) ExecutePlayerLoop
    0x00007FFC2C8DA0D0 (UnityPlayer) PlayerLoop
    0x00007FFC2C357DA2 (UnityPlayer) PerformMainLoop
    0x00007FFC2C35641A (UnityPlayer) MainMessageLoop
    0x00007FFC2C35B116 (UnityPlayer) UnityMainImpl
    0x00007FFC2C35D48B (UnityPlayer) UnityMain
    0x00007FF7265911FA (NexusDestructionRoom) __scrt_common_main_seh
    0x00007FFCABEF3034 (KERNEL32) BaseThreadInitThunk
    0x00007FFCAC063691 (ntdll) RtlUserThreadStart

    The crash occurs only when I minimize or alt-tab away from the built player. The code in question, I believe, relates to my use of RaycastCommand being used to perform a bunch of raycasting. This all works fine when my game has focus, but nearby every time I tab away and let it run, it crashes.

    I've attached the full crash dump, in case that's helpful. If this isn't a known issue, I'll see what I can do to isolate a create a test project.

    Attached Files: