Reproduction steps:
1. Open the attached “ReproProj” project
2. Open the “Assets/Scenes/Gray&Threshold.unity” scene
3. Enter the Play Mode
Expected result: The Play Mode is entered
Actual result: The Editor crashes
Reproducible with: 2022.3.32f1, 6000.0.5f1
Couldn’t test with: 2021.3.39f1 (Memory Profiler errors)
Reproducible on: Windows 10
Not reproducible on: macOS 14.5 (M1 Max)
First few lines of the stack trace:
0x00007ff606108807 (Unity) tlsf_memalign
0x00007ff603eb2bf9 (Unity) DynamicHeapAllocator::Allocate
0x00007ff603ec18ac (Unity) DualThreadAllocator<DynamicHeapAllocator>::Allocate
0x00007ff603eb3381 (Unity) MemoryManager::Allocate
0x00007ff603ebd8ce (Unity) malloc_internal
0x00007ff604013e5d (Unity) core::vector_detail::vector_data::resize_buffer
0x00007ff6037a5fe8 (Unity) core::vector<signed char,0>::resize_buffer_nocheck
0x00007ff603e4cc85 (Unity) core::vector<signed char,0>::assign
0x00007ff6040b4ce1 (Unity) Texture2D::UnshareTextureData