Search Unity

Having a crash in physicsmanager::simulate

Discussion in 'Physics' started by LeagueOfMonkeys, Aug 28, 2019.

  1. LeagueOfMonkeys

    LeagueOfMonkeys

    Joined:
    Aug 13, 2012
    Posts:
    33
    I've been getting this crash, which I initally thought was to do with
    https://issuetracker.unity3d.com/is...92.1391109241.1564458200-135128914.1556601065
    however I'm still getting it on the latest 2018.4 (6/7).(note is it was introduced some time after 4.1LTS)

    Is there any way to prevent the Rigidbody::IsSleeping() method from causing an AV? (it is an inconsistent crash, with some devices not occurring at all and others constantly)

    My crash log is this :

    Date/Time: 2019-08-26 23:00:58.3540 -0700 Launch Time: 2019-08-26 22:54:27.0891 -0700 OS Version: iPhone OS 12.4 (16G77) Baseband Version: 7.80.04 Report Version: 104

    Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000 VM Region Info: 0 is not in any region. Bytes before following region: 4307288064 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 0000000100bc0000-0000000104068000 [ 52.7M] r-x/r-x SM=COW ...torqueburnout

    Triggered by Thread: 0

    Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 torqueburnout 0x0000000101121204 Rigidbody::IsSleeping() + 5640708 (Rigidbody.cpp:1651) 1 torqueburnout 0x0000000101110500 PhysicsManager::Simulate(int, float) + 5571840 (PhysicsManager.cpp:772) 2 torqueburnout 0x00000001013fa8fc ExecutePlayerLoop(NativePlayerLoopSystem) + 8628476 (PlayerLoop.cpp:347) 3 torqueburnout 0x00000001013fa930 ExecutePlayerLoop(NativePlayerLoopSystem) + 8628528 (PlayerLoop.cpp:365) 4 torqueburnout 0x00000001013fab10 PlayerLoop() + 8629008 (PlayerLoop.cpp:419) 5 torqueburnout 0x00000001016d4ddc UnityPlayerLoopImpl(bool) + 11619804 (LibEntryPoint.mm:272) 6 torqueburnout 0x0000000100bcd2e4 UnityRepaint + 53988 (UnityAppController+Rendering.mm:280) 7 torqueburnout 0x0000000100bcd1c0 -[UnityAppController(Rendering) repaintDisplayLink] + 53696 (UnityAppController+Rendering.mm:72) 8 QuartzCore 0x000000019009eff0 CA::Display::DisplayLink::dispatch_items+ 73712 (unsigned long long, unsigned long long, unsigned long long) + 636 9 IOKit 0x000000018beeb4b0 IODispatchCalloutFromCFMessage + 488 10 CoreFoundation 0x000000018bbfa19c CFMachPortPerform + 188 11 CoreFoundation 0x000000018bc20da0 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 56 12 CoreFoundation 0x000000018bc204ec CFRunLoopDoSource1 + 440 13 CoreFoundation 0x000000018bc1b310 __CFRunLoopRun + 2096 14 CoreFoundation 0x000000018bc1a7c0 CFRunLoopRunSpecific + 436 15 GraphicsServices 0x000000018de1b79c GSEventRunModal + 104 16 UIKitCore 0x00000001b8599c38 UIApplicationMain + 212 17 torqueburnout 0x0000000100bc4b00 main + 19200 (main.mm:41) 18 libdyld.dylib 0x000000018b6de8e0 start + 4
     
  2. LeagueOfMonkeys

    LeagueOfMonkeys

    Joined:
    Aug 13, 2012
    Posts:
    33
    hmmm, seeing this on 4.1 as well now so it is something that changed in the code base i guess
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,456
    Whilst I know nothing about this bug I quickly checked for you using our internal bug tracking system for case 1122684 and it says that the fix for 2018 landed in Version 2018.4.7f1 @ Wed, 14 Aug 2019 19:41:49 GMT

    If the fix isn't working then let me know and I'll pass it along to the 3D physics team.
     
  4. LeagueOfMonkeys

    LeagueOfMonkeys

    Joined:
    Aug 13, 2012
    Posts:
    33
    i was able to still get the bug on ios for 2018.4.7f1, ill try updating android as well (which was 2018.4.6f1)
     
  5. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,456
    I just checked again and it seems the bug report has been reopened and elevated yesterday and assigned to the 3D physics team. It's possible that the bug was caused by a few issues with only one part fixed. I know I've certainly seen bugs like that.
     
    Last edited: Aug 29, 2019
    NanoH likes this.
  6. z4g0

    z4g0

    Joined:
    Sep 6, 2013
    Posts:
    35
    Hi, I'm getting the same issue on Unity 2018.4.2f1 Nintendo Switch version, both in build and in editor. I'll try to install a 2018.4.7f1 environment: It seems that it happens -randomly- activating or destroying gameobjects with a rigidbody attached.
     
  7. LeagueOfMonkeys

    LeagueOfMonkeys

    Joined:
    Aug 13, 2012
    Posts:
    33
    thanks for that MelvMay
     
  8. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    596
    We had a series of problems connected to transform dispatch listeners and various ways of activation/deactivation patterns that we tried to approach one by one, and this seems to be (hopefully) the last one of them, and, pretty handy, there is now a no-longer-huge repro project. Working on it soon. thanks.
     
  9. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    Still happening in 2019.3.0f5. Pooled ammo rigidbody cause crashes when they are non-kinematic and parented to another object. To go around this is to have hundreds of unparented ..in my case..atomic particles.. hanging about in the hierarchy. Thought it was particles but disabled those and still a hard crash to the desktop.