Search Unity

Bug Unity crash when enter playmode with Havok Physics enabled

Discussion in 'Physics for ECS' started by filod, Nov 25, 2019.

  1. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    only happens in 2019.3.0b12 + Entities 0.2.0-preview.18
     
  2. Rory_Havok

    Rory_Havok

    Joined:
    Jun 25, 2018
    Posts:
    70
    Hi, which platform are you on?
     
  3. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    Windows 10 18362.476
    AMD Ryzen 9 3900x
     
  4. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    Thanks for the details. We are looking into an updated release of the Unity Physics and the Havok Physics packages supporting 0.2.0. In the meantime, if you have any crashlogs or specific errors you are seeing that would be useful.
     
  5. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    this also happens in 2020.1 alpha, i have uploaded crash dump through unity crash tool.

    also another wierd behavior that it may cause camera (in HDRP) only display one color, like Doing a raycast from the camera and taking the color it hits first and render to screen. ( i can't reproduce the bug always, also can not relate this to Havok)
     
    Last edited: Nov 28, 2019
  6. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    Currently Havok Physics requires elements of the Colliders to be 16 byte aligned, for internal performance. Something has changed relatively recently to stop the Colliders being so aligned.
    So unfortunately, at the minute my main suggestion is to go back to an earlier version of Unity.Entities if you need Havok and I will update this thread asap when I hear more :(
     
    rz_0lento and filod like this.
  7. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    As a side note, I noticed that 2019.3.0f1 play in editor just starts to crawl if I have current Havok package installed with Entities 0.2. I doesn't crash with me but it's definitely making the editorloop consume a huge amount of time despite I still keep running physics with Unity Physics. It does crash the moment I try to remove the havok package from package manager tho :D

    I assume this is all related to reason mentioned on Steve's above comment.
     
  8. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    The spatial query functions (like aabb overlaps, or ray & collider casting) are all handled on the DOTS Physics framework side (i.e. in the C# CollisionWorld code belong to the Unity Physics package).
    The Havok Physics package supplies a Visual Debugging tool and a replacement Simulation backend to handle the collision detection and response.
    This is one ugly image but might help explain that : upload_2019-11-28_16-3-26.png
     

    Attached Files:

    PhilSA likes this.
  9. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    Yeah, we are working on a new Unity Physics (and Havok Physics if necessary) release for Entities 0.2.0 and we're looking into all these issues at the minute. Lots of fun changes to juggle for little bit. Thanks for your patience.
     
    PhilSA and rz_0lento like this.
  10. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    Entities 0.3.0-preview.4 should fix this crash.
     
    filod and rz_0lento like this.