Search Unity

DOTS Physics Android Crash 0.5.1-preview.2

Discussion in 'DOTS Physics' started by xsuper_unity, Nov 18, 2020.

  1. xsuper_unity

    xsuper_unity

    Joined:
    Oct 9, 2020
    Posts:
    3
    Hi,

    I tried a test scene using 0.5.1-preview.2, and it works on the Unity Editor. However, when I build for Oculus Quest and I am getting instantly booted out of the game. If I switch the physics package to 0.4.1-preview, I do not have such issues.
    Anyone know if there's anything I should be aware of?

    Thanks!
     
  2. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    480
    Any possibility of getting a repro to test locally? Is it a 32-bit Android app? Are you getting an assert on AllocateChunk for example? On android32 (ARMv7, Mono backend) there was a bug were the virtual file system was incorrectly being used.
     
  3. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    1,018
    You can refer Case 1288992. I believe it's same issue. Do have an ETA of DOTS Physics package hotfix?
     
    Last edited: Nov 25, 2020
  4. Atheosls

    Atheosls

    Joined:
    May 19, 2017
    Posts:
    7
    same question
     
  5. Atheosls

    Atheosls

    Joined:
    May 19, 2017
    Posts:
    7
  6. milos85miki

    milos85miki

    Joined:
    Nov 29, 2019
    Posts:
    197
    Hi @xsuper_unity , @Atheosls ,

    Could you please try with entities@0.16.0-preview.21 package?
    I just tried the project attached to case 1288992 in 2020.1.15f1 editor and it seems to work fine on my pretty low-end phone.

    Newer entites package is probably crucial, but here's the full set of packages from my Editor.log for reference (log's in C:\Users\<your_user_name>\AppData\Local\Unity\Editor) :
    com.unity.burst@1.3.9
    com.unity.cinemachine@2.6.3
    com.unity.dots.editor@0.11.0-preview.3
    com.unity.ide.rider@3.0.1
    com.unity.ide.visualstudio@2.0.3
    com.unity.netcode@0.5.0-preview.5
    com.unity.physics@0.5.1-preview.2
    com.unity.platforms.android@0.9.0-preview.9
    com.unity.platforms.linux@0.9.0-preview.9
    com.unity.platforms.windows@0.9.0-preview.9
    com.unity.render-pipelines.universal@8.2.0
    com.unity.textmeshpro@3.0.3
    com.unity.timeline@1.3.6
    com.unity.test-framework@1.1.18
    com.unity.nuget.newtonsoft-json@2.0.0-preview
    com.unity.render-pipelines.core@8.2.0
    com.unity.shadergraph@8.2.0
    com.unity.platforms@0.9.0-preview.9
    com.unity.platforms.desktop@0.9.0-preview.9
    com.unity.collections@0.14.0-preview.16
    com.unity.entities@0.16.0-preview.21
    com.unity.jobs@0.7.0-preview.17
    com.unity.mathematics@1.2.1
    com.unity.test-framework.performance@2.3.1-preview
    com.unity.transport@0.5.0-preview.5
    com.unity.nuget.mono-cecil@0.1.6-preview.2
    com.unity.scriptablebuildpipeline@1.9.0
    com.unity.properties@1.5.0-preview
    com.unity.serialization@1.5.0-preview
    com.unity.properties.ui@1.5.0-preview
    com.unity.ext.nunit@1.0.0
    com.unity.searcher@4.0.9
    nuget.mono-cecil@0.1.6-preview

    Please let me know how it went, I'm with you until we make it work. :)
     
  7. Atheosls

    Atheosls

    Joined:
    May 19, 2017
    Posts:
    7
    The above test is entities@0.16.0-preview.21
     
  8. milos85miki

    milos85miki

    Joined:
    Nov 29, 2019
    Posts:
    197
    Aham, thanks, it might be a different issue (comparing to Case 1288992). Is there a way you could make a minimal repro project, please?
    It'd really help if I could try it locally and debug.
     
  9. xsuper_unity

    xsuper_unity

    Joined:
    Oct 9, 2020
    Posts:
    3
    Hi, sorry for the late response. I am no longer experimenting with DOTS.
    Not sure if this is the right way to share, but here an example project folder that I zipped:
    https://drive.google.com/file/d/1MdTKovw4hj1hOXXGyk8uQi8NSrWDVJjl/view?usp=sharing

    Happy to provide another way if needed.

    For me, above project crashes on Oculus Quest when on the latest DOTS Physics. If i downgrade the same project to 0.4, I don't have an issue.
     
  10. langtusaupt

    langtusaupt

    Joined:
    Mar 15, 2017
    Posts:
    10
    Hi
    I have to do extra checks and the results are as follows:
    -I use Unity 2020.1.12 , Entities 0.16.0 pre21 and Physics 0.5.1-preview.2
    Create new project:
    Option 1:
    -Create Cube +Box Collider +Convert To Entity => build to Mobile => OK App works normally
    Option 2:
    -Create Cube + Physics Shape +Convert To Entity => build to Mobile => Crash
    Am I missing something ?
    Is the problem here Physics Shape ?
     
    Atheosls likes this.
  11. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    480
    So this seems to be a memory alignment issue on Android 32 bit only.
    As a temporary workaround you can make the com.unity.physics package local and change any reference to
    UNITY_COLLECTIONS_0_13_OR_NEWER
    in the code to
    !(UNITY_ANDROID && !UNITY_64)
    i.e. !Android32.

    Hopefully, I'll get this fix into the upcoming release in a few weeks time.
     
  12. langtusaupt

    langtusaupt

    Joined:
    Mar 15, 2017
    Posts:
    10
    I have followed your instructions. App is not crash anymore.
    Thanks !
     
    steveeHavok likes this.
  13. xsuper_unity

    xsuper_unity

    Joined:
    Oct 9, 2020
    Posts:
    3
    This also worked for me. Thanks for looking into this!
     
    steveeHavok and petarmHavok like this.
unityunity