Crashes iOS build when get SpriteAtlasManager.atlasRequested callback

Hello. I use SpriteAtlasManager.atlasRequested callback.
But sometimes my build crashes when get callback.

The SpriteAtlas is loaded from AssetBundle.
Why the crashes occurred?

Here is crash log :

*** Terminating app due to uncaught exception ‘(null)’, reason: ‘(null)’
Incident Identifier: 00000000-0000-0000-0000-000000000000
Hardware Model: iPhone10,3
Process: TESTPROJECT [5421]
Path: /var/containers/Bundle/Application/00000000-0000-0000-0000-000000000000/TESTPROJECT.app/TESTPROJECT
Identifier: com.unity.TESTPROJECT
Version: 0
Code Type: ARM-64
Parent Process: ??? [1]

Date/Time: 2018-06-04T09:05:21Z
OS Version: iPhone OS 11.3 (15E216)
Report Version: 104

Exception Type: SIGSEGV - 잘못된 메모리 참조
Exception Codes: SEGV_ACCERR at 0xbf051eb8bebd70a0
Crashed Thread: 0

0 libsystem_c.dylib strlen (in libsystem_c.dylib) + 12
1 TESTPROJECT il2cpp::vm::String::NewWrapper(char const*) (in TESTPROJECT) (String.cpp:69)
2 TESTPROJECT ScriptingArguments::AddString(char const*) (in TESTPROJECT) (ScriptingArguments.cpp:133)
3 TESTPROJECT SpriteAtlasManager::RequestAtlasViaScript() (in TESTPROJECT) (SpriteAtlasManager.cpp:201)
4 TESTPROJECT SpriteAtlasManager::SpriteAtlasManager(MemLabelId)::EarlyUpdateSpriteAtlasManagerUpdateRegistrator::Forward() (in TESTPROJECT) (SpriteAtlasManager.cpp:54)
5 TESTPROJECT PlayerLoop() (in TESTPROJECT) (PlayerLoop.cpp:126)
6 TESTPROJECT UnityPlayerLoopImpl(bool) (in TESTPROJECT) (LibEntryPoint.mm:243)
7 TESTPROJECT UnityRepaint (in TESTPROJECT) (UnityAppController+Rendering.mm:270)
8 TESTPROJECT -[UnityAppController(Rendering) repaintDisplayLink] (in TESTPROJECT) (UnityAppController+Rendering.mm:77)
9 QuartzCore 0x00000001868b23c0 0x1868a6000 + 50112
10 QuartzCore 0x00000001869676fc 0x1868a6000 + 792316
11 CoreFoundation 0x00000001827e0b20 0x18270d000 + 867104
12 CoreFoundation 0x00000001827fbae8 0x18270d000 + 977640
13 CoreFoundation 0x00000001827fb230 0x18270d000 + 975408
14 CoreFoundation 0x00000001827f8c80 0x18270d000 + 965760
15 CoreFoundation 0x0000000182718da8 0x18270d000 + 48552
16 GraphicsServices 0x00000001846fb020 0x1846f0000 + 45088
17 UIKit 0x000000018c6f978c 0x18c3dc000 + 3266444
18 TESTPROJECT main (in TESTPROJECT) (main.mm:33)
19 libdyld.dylib 0x00000001821a9fc0 0x1821a9000 + 4032

This is breadcrumb :
UI.Manager.RequestAtlas > start : ‘ui_loading_atlas’ 2018-06-04 10:10:24
UI.Manager.RequestAtlas > start : ‘ui_dynamic_questmark_atlas’ 2018-06-04 10:10:31
UI.Manager.RequestAtlas > start : ‘ui_global_common_atlas’ 2018-06-04 10:10:31
UI.Manager.RequestAtlas > start : ‘ui_global_wanteddungeon_atlas’ 2018-06-04 10:10:31
UI.Manager.RequestAtlas > start : ‘ui_outgame_common_atlas’ 2018-06-04 10:10:31
UI.Manager.RequestAtlas > start : ‘ui_outgame_worldmap_atlas’ 2018-06-04 10:10:31
UI.Manager.RequestAtlas > start : ‘ui_global_medal_atlas’ 2018-06-04 10:10:31
UI.Manager.RequestAtlas > start : ‘ui_outgame_common_atlas’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > start : ‘ui_global_common_atlas’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > start : ‘F’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > spriteAtlas doesn’t exist : ‘F’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > start : ‘UserCharacterTooltipBalloonUI’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > spriteAtlas doesn’t exist : ‘UserCharacterTooltipBalloonUI’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > start : ‘’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > spriteAtlas doesn’t exist : ‘’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > start : ‘AR_Trans_03_01_alpha’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > spriteAtlas doesn’t exist : ‘AR_Trans_03_01_alpha’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > start : ‘MUFollowWorldTransform’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > spriteAtlas doesn’t exist : ‘MUFollowWorldTransform’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > start : ‘’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > spriteAtlas doesn’t exist : ‘’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > start : ‘’ 2018-06-04 10:14:30
UI.Manager.RequestAtlas > spriteAtlas doesn’t exist : ‘’ 2018-06-04 10:14:30
CRASH 2018-06-04 10:14:30

Have you been able to reproduce this reliably?
I’m suffering from the same problem in 2 game projects and can’t create a small enough test case.

This occurs across a range of iOS devices and can sometimes get it to crash in the OSX editor too.
Had it across multiple versions (2017.1.z, 2017.4, 2018.1.z). with both legacy and new scripting runtimes.

It seems to be pure luck that it’ll crash or not crash when loading assets which makes me think it’s a threading issue.
The SpriteAtlasManager.atlasRequested callback will be triggered with either an empty string or garbage in amongst the normal loads but always happens on the main thread and then triggers the stack trace you see.

I load atlases from asset bundles (both normal and variant bundles) and these bundles can be both packaged in StreamingAssets folder or downloaded over the web.