Search Unity

Editor and standalone random crashing

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

  1. Squize

    Squize

    Joined:
    Jul 17, 2015
    Posts:
    18
    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. NestorAlgieri

    NestorAlgieri

    Joined:
    Sep 11, 2011
    Posts:
    299
    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:
    18
    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:
    18
    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:
    262
    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:
    18
    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)
     
  9. anatolyV

    anatolyV

    Joined:
    Nov 29, 2014
    Posts:
    63
    Experiencing this too in 2019.1.6. Can't repro locally, only getting it from Xcode crashes, seems to happen regardless of device type and version on iOS.

    Code (CSharp):
    1. Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    2. Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
    3. VM Region Info: 0 is not in any region.  Bytes before following region: 4303060992
    4.       REGION TYPE                      START - END             [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
    5.       UNUSED SPACE AT START
    6. --->
    7.       __TEXT                 00000001007b8000-00000001007bc000 [   16K] r-x/r-x SM=COW  ....app/gameName
    8.  
    9. Termination Signal: Segmentation fault: 11
    10. Termination Reason: Namespace SIGNAL, Code 0xb
    11. Terminating Process: exc handler [6698]
    12. Triggered by Thread:  0
    13.  
    14. Thread 0 name:
    15. Thread 0 Crashed:
    16. 0   gameName                          0x0000000100e54108 Rigidbody::IsSleeping() + 4 (Rigidbody.cpp:1653)
    17. 1   gameName                          0x0000000100dd8144 ExecutePlayerLoop(NativePlayerLoopSystem*) + 88 (PlayerLoop.cpp:281)
    18. 2   gameName                          0x0000000100dd8178 ExecutePlayerLoop(NativePlayerLoopSystem*) + 140 (PlayerLoop.cpp:298)
    19. 3   gameName                          0x0000000100dd835c PlayerLoop() + 228 (PlayerLoop.cpp:354)
    20. 4   gameName                          0x000000010116273c UnityPlayerLoopImpl(bool) + 52 (LibEntryPoint.mm:0)
    21. 5   gameName                          0x00000001007c5008 UnityRepaint + 140 (UnityAppController+Rendering.mm:276)
    22. 6   gameName                          0x00000001007c4ef4 -[UnityAppController(Rendering) repaintDisplayLink] + 88 (UnityAppController+Rendering.mm:71)
    23. 7   QuartzCore                        0x0000000203228f90 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 636 (CADisplay.mm:2349)
    24. 8   QuartzCore                        0x00000002032f2b10 display_timer_callback(__CFMachPort*, void*, long, void*) + 272 (CADisplayTimer.cpp:163)
    25. 9   CoreFoundation                    0x00000001fee0ca8c __CFMachPortPerform + 188 (CFMachPort.c:522)
    26. 10  CoreFoundation                    0x00000001fee33690 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56 (CFRunLoop.c:1996)
    27. 11  CoreFoundation                    0x00000001fee32ddc __CFRunLoopDoSource1 + 440 (CFRunLoop.c:2133)
    28. 12  CoreFoundation                    0x00000001fee2dc00 __CFRunLoopRun + 2096 (CFRunLoop.c:3152)
    29. 13  CoreFoundation                    0x00000001fee2d0b0 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
    30. 14  GraphicsServices                  0x000000020102d79c GSEventRunModal + 104 (GSEvent.c:2245)
    31. 15  UIKitCore                         0x000000022b699978 UIApplicationMain + 212 (UIApplication.m:4353)
    32. 16  gameName                          0x00000001007be150 main + 160 (main.mm:41)
    33. 17  libdyld.dylib                     0x00000001fe8f28e0 start + 4

    Not getting anything useful from analytics logging either. This is affecting about 100 devices per week for me. Anybody manage to find a workaround for now?