Search Issue Tracker

Duplicate

Votes

0

Found in

2019.2.0a11

2019.2.0a13

2019.3.0a1

Issue ID

1149495

Regression

Yes

Crash on non-development build when UnsafeUtility.Malloc() with Allocator.Persitent is called

Mono

-

How to reproduce:
1. Open user's attached project ('Test2019_2_0a13.zip')
2. Build for Windows (PC, Mac & Linux Standalone), make sure that Development Build is not ticked
3. Run the build executable
-- observe the crash

Reproducible with: 2019.2.0a11, 2019.2.0a14, 2019.3.0a1
Not reproducible with: 2017.4.26f1, 2018.3.14f1, 2019.1.1f1, 2019.2.0a10

Full line of code that crashes the built project: int* data = (int*) UnsafeUtility.Malloc(sizeof(int)*4, UnsafeUtility.AlignOf<int>(), Allocator.Persistent);

First 5 stack trace lines:
0x6631BE0A (UnityPlayer) PAL_Thread_YieldExecution
0x662F736B (UnityPlayer) PAL_Thread_YieldExecution
0x6627252A (UnityPlayer) PAL_Thread_YieldExecution
0x00F3D740 (Mono JIT Code) (wrapper managed-to-native) Unity.Collections.LowLevel.Unsafe.UnsafeUtility:Malloc (long,int,Unity.Collections.Allocator)
0x00F3D6BC (Mono JIT Code) Test:test ()

Comments (1)

  1. hoangst_wolffun

    Sep 25, 2019 14:22

    I also had this issue on the Unity 2019.2.6.

    Stack strace:
    0x00000000cedc10be std::_Rb_tree_iterator<int> std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_insert_<int const&>(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, int const&)
    0x00000000cf04942e PAL_Thread_YieldExecution

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.