How to fix ios app launch crash after ImageLoaderMachO doInitialization

We found some iOS8 users upgrade the app version through the automatic update feature provided by Apple, app will launch immediate crashed, and the crash stack is strange as below shows, it always crashed when access 0x00000000f98d79c8, sometimes it crashed at _GLOBAL__sub_I_main.mm (main.mm:0).


Does the automatic update function have the bug on iOS8?

What's the problem lead the app crashed, if reinstall the app, it will launch success.


It seems only iOS 8.x system has the problem


Incident Identifier: 53BFE9D3-6F08-4186-8A87-E967FDE43264
CrashReporter Key:   d84b036805f6b8eae44a076c75104f5ce56ece8c
Hardware Model:      iPad4,4
Process:             xxxx [21508]
Path:                /private/var/mobile/Containers/Bundle/Application/05133EDA-20A8-46CB-B464-748E2414AC42/xxxx.app/xxxx
Identifier:          com.company.xxxx
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]


Date/Time:           2019-05-18 23:25:01.613 +0800
Launch Time:         2019-05-18 23:25:01.383 +0800
OS Version:          iOS 8.4.1 (12H321)
Report Version:      105


Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000f98d79c8
Triggered by Thread:  0


Thread 0 name:
Thread 0 Crashed:
0   ???                            0x00000000f98d79c8 0 + 4186798536
1   dyld                          0x00000001200213f0 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 36 (ImageLoaderMachO.cpp:1811)
2   dyld                          0x000000012001d68c ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 332 (ImageLoader.cpp:1017)
3   dyld                          0x000000012001d4dc ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 140 (ImageLoader.cpp:489)
4   dyld                          0x000000012001d7a4 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 84 (ImageLoader.cpp:504)
5   dyld                          0x0000000120012154 dyld::initializeMainExecutable() + 200 (dyld.cpp:1122)
6   dyld                          0x00000001200158c0 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 2668 (dyld.cpp:4864)
7   dyld                          0x0000000120011044 _dyld_start + 68 (dyldStartup.s:301)


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000001   x1: 0x000000016fdfbb80   x2: 0x000000016fdfbb90   x3: 0x000000016fdfbc20
    x4: 0x00000001200391e0   x5: 0x000000000000006c   x6: 0x0000000000000000   x7: 0x00000000000008e0
    x8: 0x0000000000000000   x9: 0x0000000100004000  x10: 0x0000000100004510  x11: 0x000000000000e700
   x12: 0x0000000000000020  x13: 0x0000000135e18000  x14: 0x0000000000003fff  x15: 0x0000000000003fff
   x16: 0x0000000194ce1698  x17: 0x000046eeda4ba36b  x18: 0x0000000000000000  x19: 0x000000012003def8
   x20: 0x0000000120039118  x21: 0x00000001200391e0  x22: 0x0000000120034b13  x23: 0x0000000100019ddc
   x24: 0x0000000000000139  x25: 0x0000000000000000  x26: 0x00000001021e8d78  x27: 0x0000000100004be8
   x28: 0x00000001000045f8  fp: 0x000000016fdf7f60   lr: 0x0000000120021238
    sp: 0x000000016fdf7ef0   pc: 0x00000000f98d79c8 cpsr: 0x20000000


Binary Images:
0x100004000 - 0x1021e3fff xxxx arm64   /var/mobile/Containers/Bundle/Application/05133EDA-20A8-46CB-B464-748E2414AC42/xxxx.app/xxxx


Expected: App launch success after auto upgrade app on iOS8.


The crash problem is serious for us, and I download from AppStore using iOS8 devices, and it can launch success.