Search Unity

Editor and standalone random crashing

Discussion in 'Physics' started by Squize, Jan 10, 2019.

  1. Squize

    Squize

    Joined:
    Jul 17, 2015
    Posts:
    13
    This is a really strange one.

    Since upgrading to 2018.3.0f2 I'm getting random crashes.

    The log manages to spit something out in it's final death throes

    Code (CSharp):
    1. Receiving unhandled NULL exception
    2. Obtained 26 stack frames.
    3. #0  0x00000100fa2ecb in Rigidbody::IsSleeping()
    4. #1  0x00000100f7b6a1 in PhysicsManager::Simulate(int, float)
    5. #2  0x00000100f79789 in PhysicsManager::InitializeClass()::FixedUpdatePhysicsFixedUpdateRegistrator::Forward()
    6. #3  0x00000100c947ce in ExecutePlayerLoop(NativePlayerLoopSystem*)
    7. #4  0x00000100c9483c in ExecutePlayerLoop(NativePlayerLoopSystem*)
    8. #5  0x00000100c94a18 in PlayerLoop()
    9. #6  0x000001019b9247 in PlayerLoopController::UpdateScene(bool)
    10. #7  0x000001019b3159 in PlayerLoopController::UpdateSceneIfNeeded()
    11. #8  0x000001019b10c1 in Application::TickTimer()
    12. #9  0x000001006fa68e in -[EditorApplication TickTimer]
    13. #10 0x007fff428cc646 in __NSFireTimer
    14. #11 0x007fff4053bedd in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
    15. #12 0x007fff4053ba90 in __CFRunLoopDoTimer
    16. #13 0x007fff4053b5d0 in __CFRunLoopDoTimers
    17. #14 0x007fff4051c81b in __CFRunLoopRun
    18. #15 0x007fff4051bd48 in CFRunLoopRunSpecific
    19. #16 0x007fff3f7b2ab5 in RunCurrentEventLoopInMode
    20. #17 0x007fff3f7b27eb in ReceiveNextEventCommon
    21. #18 0x007fff3f7b2568 in _BlockUntilNextEventMatchingListInModeWithFilter
    22. #19 0x007fff3da6d363 in _DPSNextEvent
    23. #20 0x007fff3da6c102 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
    24. #21 0x007fff3da66165 in -[NSApplication run]
    25. #22 0x007fff3da558a3 in NSApplicationMain
    26. #23 0x0000010072292c in EditorMain(int, char const**)
    27. #24 0x00000100722da9 in main
    28. #25 0x007fff6d75ded9 in start
    29.  
    (Sorry about the formatting, I never post here so it's all new and scary).

    I've not been able to narrow it down, it'll just randomly happen when testing my game. Also I've done the thing of changing the collision type as that was throwing errors as covered in another recent thread.

    Just for completeness I'm on macOS Mojave 10.14.2.

    A starting point to look at would be great if anyone has had anything similar.

    Cheers.
     
  2. nepoez

    nepoez

    Joined:
    Sep 11, 2011
    Posts:
    293
    I got similar issue starting 2018.3. Have you solved it?

    Code (CSharp):
    1.  
    2. Write to location 00000000E8E37DE8 caused an access violation.
    3.  
    4. Context:
    5. RDI:    0x00000000e8f3dda0  RSI: 0x00000000e8f3dd30  RAX:   0x00000000e8e37d90
    6. RBX:    0x0000000000000000  RCX: 0x00000000e8e37de8  RDX:   0x0000000143e37fa0
    7. RIP:    0x00000000e8e37de8  RBP: 0x0000000000000001  SegCs: 0x0000000100000033
    8. EFlags: 0x0000000000010202  RSP: 0x00000000005fd948  SegSs: 0x000000010000002b
    9. R8:     0x00000000005fd8a8  R9:  0x00000000d6ef2dd0  R10:   0x0000000000000000
    10. R11:    0x00000000005fd920  R12: 0x0000000142d3a140  R13:   0x000000000dac9390
    11. R14:    0x00000000d4305980  R15: 0x00000000e8e37e40
    12.  
    13.  
    14. Bytes at CS:EIP:
    15. 90 7d e3 e8 00 00 00 00 91 01 00 00 00 00 00 00
    16.  
    17. *** WARNING ***
    18. Managed call stack frames will be incorrect or missing.
    19. The Mono DLL at 'C:\Program Files\Unity2018_3_4f1\Editor\Data\Mono\EmbedRuntime\mono.dll' does not provide out-of-process stack information support.
    20. Upgrade to a newer version of the Mono Scripting Runtime for more detailed debug information.
    21.  
    22.  
    23. Stack Trace of Crashed Thread 31192:
    24. ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 00000000E8E37DE8)
    25. ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 00000000E8E37DE8)
    26. 0x00000000E8E37DE8 ((<unknown>)) (function-name not available)
    27. 0x0000000140B3D965 (Unity) PhysicsManager::Simulate
    28. 0x0000000140B362F6 (Unity) `PhysicsManager::InitializeClass'::`2'::FixedUpdatePhysicsFixedUpdateRegistrator::Forward
    29. 0x000000014095FFD7 (Unity) ExecutePlayerLoop
    30. 0x00000001409600A3 (Unity) ExecutePlayerLoop
    31. 0x0000000140963351 (Unity) PlayerLoop
    32. 0x000000014133DD4F (Unity) PlayerLoopController::UpdateScene
    33. 0x000000014133C300 (Unity) Application::TickTimer
    34. 0x00000001414981CB (Unity) MainMessageLoop
    35. 0x0000000141499E66 (Unity) WinMain
    36. 0x000000014247DE8A (Unity) __scrt_common_main_seh
    37. 0x00007FFEC21781F4 (KERNEL32) BaseThreadInitThunk
    38. 0x00007FFEC4DDA251 (ntdll) RtlUserThreadStart
    39.  
    40. Stacks for Running Threads:
    41.  
    42. Call Stack for Thread 26564:
    43. 0x00007FFEC4E0F6F4 (ntdll) ZwWaitForSingleObject
    44. 0x00007FFEC19245C3 (KERNELBASE) WaitForSingleObjectEx
    45. 0x0000000140AF6A28 (Unity) profiling::Dispatcher::Run
    46. 0x0000000140AF6C2E (Unity) profiling::Dispatcher::ThreadFunc
    47. 0x0000000140A70D24 (Unity) Thread::RunThreadWrapper
    48. 0x00007FFEC21781F4 (KERNEL32) BaseThreadInitThunk
    49. 0x00007FFEC4DDA251 (ntdll) RtlUserThreadStart
    50.  
     
  3. Squize

    Squize

    Joined:
    Jul 17, 2015
    Posts:
    13
    Sorry about the late reply (Started a new job and moved, so that's being nice and relaxing).

    I'm afraid not no.
     
  4. Kimimaru

    Kimimaru

    Joined:
    Nov 16, 2013
    Posts:
    3
    We're getting this issue as well, with no clear cause of the crash. It looks to be something internal in Unity's new collision system, as it happens in our project when a Rigidbody collides with the floor (non-terrain) about a second after it's set to non-kinematic.
     
  5. Squize

    Squize

    Joined:
    Jul 17, 2015
    Posts:
    13
    Ah, that narrows it down a little. Also sorry for your pain, it's become a real blocker on my game to the point that I've started playing with DOTS physics as a replacement (But the amount of work to move everything over, plus how relatively young the new package is, well its just not good)
     
  6. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    131
    We are seeing this now too. Anyone get anywhere with it?
     
  7. demid

    demid

    Joined:
    Mar 20, 2012
    Posts:
    9
    I'm struggling with this strange crash for more than a week now and I failed to create a repro scene, but in my main scene, the issue is stable and looks related somehow to the ragdoll mode. Something is definitely wrong inside PhysicsManager::Simulate.
    I'll try to explain my case: an animated character dies and switches to the ragdoll mode. Animator is disabled at this time and a child ragdoll tree becomes active. The issue happens few moments after collision with the floor (it's just a game object, not a terrain). When I disable a ragdoll subtree except for the root bone, the crash disappears. When I enable any single descendent bone with a character joint, Unity crashes. I'm working from Windows and porting my project to Android, so I don't think it's a platform related issue, the problem should be inside the physics engine.

    0x00007FF6E88CB233 (Unity) PhysicsManager::Simulate
    0x00007FF6E88C6ABE (Unity) `PhysicsManager::InitializeClass'::`2'::FixedUpdatePhysicsFixedUpdateRegistrator::Forward
    0x00007FF6E849A3C8 (Unity) ExecutePlayerLoop
    0x00007FF6E849A4A6 (Unity) ExecutePlayerLoop
    0x00007FF6E849F060 (Unity) PlayerLoop
    0x00007FF6E71BEBA0 (Unity) PlayerLoopController::UpdateScene
    0x00007FF6E71BBC19 (Unity) Application::TickTimer
    0x00007FF6E747A2EB (Unity) MainMessageLoop
    0x00007FF6E7483CF7 (Unity) WinMain
    0x00007FF6E9DC349E (Unity) __scrt_common_main_seh
    0x00007FFB476313D2 (KERNEL32) BaseThreadInitThunk
    0x00007FFB486F54F4 (ntdll) RtlUserThreadStart

    The project was working fine in older versions of Unity (Unity 5.x - 2018.2.3f1) and stopped working in later versions, including 2018.4.1f1 and 2019.1.4f1.

    Update: it looks like the issue is fixed in 2019.3: https://issuetracker.unity3d.com/issues/crash-in-physics-physicsmanager-simulate. But 2019.3 is just an alpha ((((
    Update 2: Unfortunately, the issue persists in Unity 2019.3.0a4
     
    Last edited: Jun 7, 2019
  8. Squize

    Squize

    Joined:
    Jul 17, 2015
    Posts:
    13
    Thanks for sharing your findings with it (I'm not using a rag doll so it seems like there's something just generally broken in there, one with no repo steps anyone can really pin down)