App crash that build with xcode 15 on ios 13.7, errror #3 0x000000010e5508d4 in ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) ()

I need some help on some crash issues on the app that I build with Xcode15. I previously encountered compatibility issues with various real iPhone models when using Xcode 14, hence I upgraded xcode 14 to 15 and resolved the compatibility issues. Even the build is success, however the app crashes when it launch on iphone XS with the error:

 errror #3	0x000000010e5508d4 in ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) ().   

It doesn’t appear to be related to my local C++ code. I googled on that, some threads recommend me to do clean build, delete .xcodeproj and regenerate xcodeproj, restart xcode, unchecked thread sanitizer etc etc. But I tried that, problem still persist. I wonder does anyone know what can cause the problem?

xcode version: xcode15 psychical Iphone model: iphone XS ios version : 13.7

What is your C++ code doing?

I had a similar crash. Found to be issue with RealmSwift (10.36.0). Updating to 10.44.0 resolved it.

dyldImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 424 dyldImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 52

I also meet same crash on ios12.X、iOS13.X、iOS14.X

I try to resolve it by

https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking

but it does not work!

I'm having a similar issue. I created a simple xcode app project in objective c. I renamed my appdelegate source file to AppDelegate.mm to accept c++ code then included the following in the applicationDidFinishLaunching method:

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
	// Insert code here to initialize your application
	NSLog(@"bf new");
	UInt8 * b = new UInt8[512];
	NSLog(@"af new");
	delete[] b;
	NSLog(@"af del");
}

the app crashes on UInt8 * b = new UInt8[512] alerting me of some memory corruption:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [518]

VM Regions Near 0:
--> 
    __TEXT                      104be0000-104be4000    [   16K] r-x/r-x SM=COW  /Volumes/*/crash2.app/Contents/MacOS/crash2

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   ???                           	000000000000000000 0 + 0
1   com.apple.CoreFoundation      	0x000000019da365c4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28
2   com.apple.CoreFoundation      	0x000000019dad85a0 ___CFXRegistrationPost_block_invoke + 52
3   com.apple.CoreFoundation      	0x000000019dad850c _CFXRegistrationPost + 456
4   com.apple.CoreFoundation      	0x000000019da0507c _CFXNotificationPost + 720
5   com.apple.Foundation          	0x000000019e792370 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
6   com.apple.AppKit              	0x00000001a023f710 -[NSApplication _postDidFinishNotification] + 340
7   com.apple.AppKit              	0x00000001a023f428 -[NSApplication _sendFinishLaunchingNotification] + 236
8   com.apple.AppKit              	0x00000001a023c514 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 580
9   com.apple.AppKit              	0x00000001a023c0fc -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 780
10  com.apple.Foundation          	0x000000019e7bf1c4 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 344
11  com.apple.Foundation          	0x000000019e7beffc _NSAppleEventManagerGenericHandler + 96
12  com.apple.AE                  	0x00000001a36e0850 0x1a36d4000 + 51280
13  com.apple.AE                  	0x00000001a36e00cc 0x1a36d4000 + 49356
14  com.apple.AE                  	0x00000001a36d8b80 aeProcessAppleEvent + 520
15  com.apple.HIToolbox           	0x00000001a597e62c AEProcessAppleEvent + 68
16  com.apple.AppKit              	0x00000001a0236410 _DPSNextEvent + 1836
17  com.apple.AppKit              	0x00000001a02349c8 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1292
18  com.apple.AppKit              	0x00000001a0226814 -[NSApplication run] + 596
19  com.apple.AppKit              	0x00000001a01f8240 NSApplicationMain + 1064
20  brando.crash2                 	0x0000000104be2ff4 main + 44
21  libdyld.dylib                 	0x000000019d961430 start + 4

This only happens when I build using Xcode 15.0 and run on macOS 11.7.10. Other macOS versions work fine. I believe my issue may be related to yours because your crash is happening in some initialization process.

meet the same problem with xcode 15.

change to xcode 14 solves it.