Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Allocator.Persistent crash in non-dev build 2019.2.0a13

Discussion in '2019.2 Beta' started by JooleanLogic, Apr 25, 2019.

  1. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    This code crashes in a non-dev build but only with the Persistent allocator. It works if you use Temp or TempJob.
    Code (CSharp):
    1. int* data = (int*) UnsafeUtility.Malloc(sizeof(int)*4, UnsafeUtility.AlignOf<int>(), Allocator.Persistent);
    My game was crashing immediately after the Unity logo and I tracked it down to the first Persistent allocation of the NativeMultiHashMap s_StableTypeHashToTypeIndex in TypeManager.InitialiseAllComponents() when ecs bootstraps.

    If I disable ecs via UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP, then I can crash it with nothing but the code above in a completely new empty project.
    I'm building with mono and it crashes in Windows, Linux and Android. Doesn't crash in the Editor or in dev builds. Discovered it in 2019.2.0a11 but it still exists in 0a13.
    It doesn't crash in 2019.1.0b10 which is the last version of 2019.1 I've got installed.
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Could you please submit a bug report with a minimal reproduction project for this issue and reply in here with the issue ID?
     
  3. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
  4. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136