App crashed when running on M1 mac

Our app will crash when launching on the M1 mac, and the same app on iPhone or iPad are normal. I can't figure out what's the problem with our code through the log file.

Here are the crash logs from two app versions:

The similar information I can get is :

Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Kernel Triage:
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage

and in the main thread, the same call stack is:

7   libsystem_c.dylib             	       0x187d3eca4 raise + 32
8   libdispatch.dylib             	       0x187c7abac _dispatch_client_callout + 20
9   libdispatch.dylib             	       0x187c7e080 _dispatch_continuation_pop + 504
10  libdispatch.dylib             	       0x187c911a4 _dispatch_source_invoke + 1356
11  libdispatch.dylib             	       0x187c89000 _dispatch_main_queue_callback_4CF + 772
12  CoreFoundation                	       0x187f45e60 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
13  CoreFoundation                	       0x187f03820 __CFRunLoopRun + 2540
14  CoreFoundation                	       0x187f02694 CFRunLoopRunSpecific + 600
15  HIToolbox                     	       0x190a78990 RunCurrentEventLoopInMode + 292
16  HIToolbox                     	       0x190a78704 ReceiveNextEventCommon + 552
17  HIToolbox                     	       0x190a784c4 _BlockUntilNextEventMatchingListInModeWithFilter + 72
18  AppKit                        	       0x18aa57aec _DPSNextEvent + 844
19  AppKit                        	       0x18aa56390 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1332
20  AppKit                        	       0x18aa483b0 -[NSApplication run] + 596
21  AppKit                        	       0x18aa19a84 NSApplicationMain + 1064
22  AppKit                        	       0x18acefff0 _NSApplicationMainWithInfoDictionary + 24
23  UIKitMacHelper                	       0x19d3f0484 UINSApplicationMain + 1280
24  UIKitCore                     	       0x1af23ece4 UIApplicationMain + 164
25  OKEx                          	       0x1005b771c 0x1005b0000 + 30492
26  dyld                          	       0x1068bd0f4 start + 520

Is there any suggestions?

Same problem. My app is iOS/iPad OS only. It works fine when running with Xcode on M1 mac, but on the production environment it crashes when launch.

Device: M1 mac, Mac OS 12.6 (21G115)

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000100f5c4b8
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: exc handler [1174]

Triggered by Thread:  0

Kernel Triage:
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
App crashed when running on M1 mac
 
 
Q