My app crashes in certain moments in release build. I don't know if it is important but I use mainly c++ with cocos2d-x framework. I tried setting optimization level to none but it won't work too. I get this output in console :
libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: map::at: key not found
This is part of the crash log:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3870d1f0 0x386fa000 + 78320
1 libsystem_pthread.dylib 0x38777792 0x38774000 + 14226
2 libsystem_c.dylib 0x386bdfd8 0x38675000 + 298968
3 libc++abi.dylib 0x379eccd2 0x379ec000 + 3282
4 libc++abi.dylib 0x37a056aa 0x379ec000 + 104106
5 libobjc.A.dylib 0x3814af86 0x38147000 + 16262
6 libc++abi.dylib 0x37a031c4 0x379ec000 + 94660
7 libc++abi.dylib 0x37a02d28 0x379ec000 + 93480
8 libobjc.A.dylib 0x3814ae12 0x38147000 + 15890
9 CoreFoundation 0x2d3d2f80 0x2d3cb000 + 32640
10 CoreFoundation 0x2d3d2cee 0x2d3cb000 + 31982
11 GraphicsServices 0x3230565e 0x322fc000 + 38494
12 UIKit 0x2fd1e168 0x2fcb0000 + 450920
13 BumpRace iOS 0x00044b1e 0x4000 + 264990
14 libdyld.dylib 0x38657ab4 0x38656000 + 6836
Any help would be apprieciated.
You must use iOS instruments tool. To debug you memory leaks. As possible to conclude from youre ERROR message.
Small useful link.
Related
I'd like to be able to include diagnostic information in an iOS crash report. Part of the motivation is to include more information about the cause of the error and earlier stack traces.
In my scenario I have control over an NSException object that is thrown. That is, the crashes aren't due to segfaults, for instance. However, the default crash report (e.g. from TestFlight) hides NSException fields like name, reason, and userInfo:
NSException *exception = [NSException exceptionWithName:name
reason:reason
userInfo:userInfo];
#throw exception;
produces:
Incident Identifier: 00000000-0000-0000-0000-000000000000
Hardware Model: iPhone13,3
Process: Example [12345]
...
Date/Time: 2022-08-11 12:21:45.7780 +0000
Launch Time: 2022-08-11 12:20:45.7780 +0000
OS Version: iPhone OS 15.6 (19G71)
...
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 5
Last Exception Backtrace:
0 CoreFoundation 0x1951a5288 __exceptionPreprocess + 220 (NSException.m:200)
1 libobjc.A.dylib 0x1aded4744 objc_exception_throw + 60 (objc-exception.mm:565)
2 Example 0x102bc379c -[Example throwException:] + 24 (Example.m:422)
3 Example 0x102bd7964 -[Example _crash] + 984 (Example.m:222)
...
8 libdispatch.dylib 0x194e14c80 _dispatch_lane_invoke + 392 (queue.c:3944)
9 libdispatch.dylib 0x194e1f500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
10 libsystem_pthread.dylib 0x206b050bc _pthread_wqthread + 288 (pthread.c:2599)
11 libsystem_pthread.dylib 0x206b04e5c start_wqthread + 8
Is there any way to add more diagnostics information to these crash reports?
My App got rejected 4th time in review from Apple team, they are saying App is crashing on tap of verify OTP button. They have shared a crash log, After checking the log I got to know that app is crashing due to null verification ID.
However everything is working perfectly locally and Android version is live, I have tested in real device & in emulator. Now I am not able to understand why verification ID is getting null sometime. I have already added try catch to handle exception, But that is not working in iOS, But working in Android.
Can someone please help me on this.
Below is the crash log...
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 9
Last Exception Backtrace:
(0x1ae904a48 0x1ae62bfa4 0x1ae8085a8 0x1ae908af4 0x1ae90aa7c 0x10264cc88 0x102648d58 0x1026489ec 0x1ae5d0610 0x1ae5d1184 0x1ae57d404 0x1ae57ddf8 0x1ae587314 0x1ae620b88 0x1ae623760)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x00000001ae6da634 0x1ae6d7000 + 13876
1 libsystem_kernel.dylib 0x00000001ae6d9aa0 0x1ae6d7000 + 10912
2 CoreFoundation 0x00000001ae882288 0x1ae7d9000 + 692872
3 CoreFoundation 0x00000001ae87d3a8 0x1ae7d9000 + 672680
4 CoreFoundation 0x00000001ae87cadc 0x1ae7d9000 + 670428
5 GraphicsServices 0x00000001b8802328 0x1b87ff000 + 13096
6 UIKitCore 0x00000001b2977ae0 0x1b1f74000 + 10500832
7 Runner 0x000000010263edf4 0x102638000 + 28148
8 libdyld.dylib 0x00000001ae706360 0x1ae705000 + 4960
Thread 1 name: com.apple.uikit.eventfetch-thread
Thread 1:
0 libsystem_kernel.dylib 0x00000001ae6da634 0x1ae6d7000 + 13876
1 libsystem_kernel.dylib 0x00000001ae6d9aa0 0x1ae6d7000 + 10912
2 CoreFoundation 0x00000001ae882288 0x1ae7d9000 + 692872
3 CoreFoundation 0x00000001ae87d3a8 0x1ae7d9000 + 672680
4 CoreFoundation 0x00000001ae87cadc 0x1ae7d9000 + 670428
5 Foundation 0x00000001aebbc7f4 0x1aebb5000 + 30708
6 Foundation 0x00000001aebbc6d4 0x1aebb5000 + 30420
7 UIKitCore 0x00000001b2a10204 0x1b1f74000 + 11125252
8 Foundation 0x00000001aeced0a4 0x1aebb5000 + 1278116
9 libsystem_pthread.dylib 0x00000001ae61fd8c 0x1ae615000 + 44428
10 libsystem_pthread.dylib 0x00000001ae62376c 0x1ae615000 + 59244
For some reasons our internal testers was able to run the app but somehow the apple beta tester says the app crashes as soon as the app launches. They provided me with this error
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 1
Application Specific Information:
abort() called
Last Exception Backtrace:
(0x18d80827c 0x18c9e29f8 0x101124b94 0x101121108 0x18d80f900 0x18d6f14d0 0x18d6f2104 0x101137f20 0x1011778b4 0x101177614 0x18d247a38 0x18d2487d4 0x18d1f1324 0x18d1f1e40 0x18d1fa4ac 0x18d428114 0x18d42acd4)
Thread 1 name: Dispatch queue:com.facebook.react.ExceptionsManagerQueue
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x000000018d3a50dc 0x18d382000 + 143580
1 libsystem_pthread.dylib 0x000000018d41e094 0x18d41c000 + 8340
2 libsystem_c.dylib 0x000000018d2feea8 0x18d2a4000 + 372392
3 libc++abi.dylib 0x000000018c9cb788 0x18c9ca000 + 6024
4 libc++abi.dylib 0x000000018c9cb934 0x18c9ca000 + 6452
5 libobjc.A.dylib 0x000000018c9e2e00 0x18c9dd000 + 24064
6 libc++abi.dylib 0x000000018c9d7838 0x18c9ca000 + 55352
7 libc++abi.dylib 0x000000018c9d78c4 0x18c9ca000 + 55492
8 libdispatch.dylib 0x000000018d2487e8 0x18d1e8000 + 395240
9 libdispatch.dylib 0x000000018d1f1324 0x18d1e8000 + 37668
10 libdispatch.dylib 0x000000018d1f1e40 0x18d1e8000 + 40512
11 libdispatch.dylib 0x000000018d1fa4ac 0x18d1e8000 + 74924
12 libsystem_pthread.dylib 0x000000018d428114 0x18d41c000 + 49428
13 libsystem_pthread.dylib 0x000000018d42acd4 0x18d41c000 + 60628
im really not sure why the apple developer is experiencing crashes while the rest of the team was able to run the app normally through the testflight
Getting weird from notification service extension
I think this might be due to sending of AWS event from receivedNotification method which might be taking more time that causes OS killing it. if this the scenario then how should i handle the crash and prevent it.
please check the crash logs,
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace ASSERTIOND, Code 0xdead10cc
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001c829bed0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001c829b3a8 mach_msg + 72
2 CoreFoundation 0x00000001c869fbc4 __CFRunLoopServiceMachPort + 236
3 CoreFoundation 0x00000001c869aa60 __CFRunLoopRun + 1396
4 CoreFoundation 0x00000001c869a1cc CFRunLoopRunSpecific + 436
5 Foundation 0x00000001c908f404 -[NSRunLoop+ 33796 (NSRunLoop) runMode:beforeDate:] + 300
6 Foundation 0x00000001c90cadf4 -[NSRunLoop+ 278004 (NSRunLoop) run] + 88
7 libxpc.dylib 0x00000001c836c070 _xpc_objc_main + 516
8 libxpc.dylib 0x00000001c836ea30 xpc_main + 180
9 Foundation 0x00000001c90ccdb0 +[NSXPCListener serviceListener] + 0
10 PlugInKit 0x00000001ce2eb498 0x1ce2d8000 + 79000
11 PlugInKit 0x00000001ce2eb2c4 0x1ce2d8000 + 78532
12 PlugInKit 0x00000001ce2eb848 0x1ce2d8000 + 79944
13 Foundation 0x00000001c92b46bc NSExtensionMain + 64
14 libdyld.dylib 0x00000001c815abb4 start + 4
#Sumeet.Jain you need to set debug executable on your extension
project their are some steps here.
step 1: select your service extension project to run
step 2: you will see list of your project below some option "SELECT EDIT SCHEME" option
step 3: after then you have to go for RUN -> INFO -> EXECUTABLE
step 4: and you should change "ASK TO LAUNCH" to "YOUR PROJECT"
THATS IT.
I tested my app on iPhone and iPad devices and it works fine, also I tested it on iOS 10.1.1 and on IPV6 network and it also works fine but after uploading my app to the app store, it is rejected because it crashes when login if the device is offline or on Wifi. They gave me a crash report and after I symplocited it, I get thhis Info :
Date/Time: 2016-11-01 10:07:03.2150 -0700
Launch Time: 2016-11-01 10:05:21.7124 -0700
OS Version: iPhone OS 10.1 (14B72)
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000f18c0
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 MyApp -[FIRMessagingSecureSocket closeStream:] (in MyApp) + 56
1 MyApp -[FIRMessagingRmq2PersistentStore openDatabase:] (in MyApp) + 228
2 MyApp -[FIRMessagingReceiver didSendDataMessageWithID:] (in MyApp) + 128
3 Foundation 0x00000001835e08f8
4 CoreFoundation 0x0000000182aa48f4
5 CoreFoundation 0x0000000182aa4608
6 CoreFoundation 0x0000000182aa3ec4
7 CoreFoundation 0x0000000182aa1ac0
8 CoreFoundation 0x00000001829d0048
9 GraphicsServices 0x0000000184456198
10 UIKit 0x00000001889b42fc
11 UIKit 0x00000001889af034
12 MyApp -[FIRMessagingClient tryToConnect] (in MyApp) + 212
13 libdyld.dylib 0x00000001819b45b8
update :
I published new version put also get this crash log
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000a1658
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 MyApp [FIRAMeasurement setUserAttributeOnWorkerQueue:] (in MyApp) + 580
1 MyApp [FIRAMeasurement uploadData] (MyApp) + 180 0x100054000 + 303808
2 MyApp [FIRAMeasurement reportOSUpdateOnWorkerQueue] (in PetCasa Vet) + 124
3 Foundation 0x0000000187acc8f8 0x1879c1000 + 1095928
4 CoreFoundation 0x0000000186f908f4 0x186eb3000 + 907508
5 CoreFoundation 0x0000000186f90608 0x186eb3000 + 906760
6 CoreFoundation 0x0000000186f8fec4 0x186eb3000 + 904900
7 CoreFoundation 0x0000000186f8dac0 0x186eb3000 + 895680
8 CoreFoundation 0x0000000186ebc048 0x186eb3000 + 36936
9 GraphicsServices 0x0000000188942198 0x188936000 + 49560
10 UIKit 0x000000018cea02fc 0x18ce25000 + 504572
11 UIKit 0x000000018ce9b034 0x18ce25000 + 483380
12 MyApp 0x00000001000907d8 (in MyApp) + 448
13 libdyld.dylib 0x0000000185ea05b8 0x185e9c000 + 17848
and this log crash :
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000e5658
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 MyApp 0x00000001000e5658 (in MyApp) + 1060
1 MyApp [FIRMessagingConnection loginRequestWithToken:authID:] (in MyApp) + 300
2 MyApp [FIRMessagingConnection initWithAuthID:token:host:port:runLoop:rmq2Manager:gcmManager:] (in MyApp) + 32
3 Foundation 0x0000000187acc8f8 0x1879c1000 + 1095928
4 CoreFoundation 0x0000000186f908f4 0x186eb3000 + 907508
5 CoreFoundation 0x0000000186f90608 0x186eb3000 + 906760
6 CoreFoundation 0x0000000186f8fec4 0x186eb3000 + 904900
7 CoreFoundation 0x0000000186f8dac0 0x186eb3000 + 895680
8 CoreFoundation 0x0000000186ebc048 0x186eb3000 + 36936
9 GraphicsServices 0x0000000188942198 0x188936000 + 49560
10 UIKit 0x000000018cea02fc 0x18ce25000 + 504572
11 UIKit 0x000000018ce9b034 0x18ce25000 + 483380
12 MyApp [FIRInstanceIDRegistrationClient parseToken:authToken:withRequestID:handler:] (in MyApp) + 564
13 libdyld.dylib 0x0000000185ea05b8 0x185e9c000 + 17848
From apple documentation
Trace Trap [EXC_BREAKPOINT // SIGTRAP]
......
......
Swift code will terminate with this exception type if an unexpected
condition is encountered at runtime such as:
1- a non-optional type with a nil
2- value a failed forced type conversion
In my app I use location and I send it to backend, and it works fine, but when opening app at first time, system show alert to say that my app want to use your location allow or not allow, if user didn't allow so location methods will not work and location will be nil and unfortunately I didn't check if location is nil so when unwrap it app crashed, it's my mistake.
Please send message to the Apple review team about same and ask to them
"We tested application on iPhone 6, 6s, 7 and 7+ with iOS 10.x and application works perfect in IPV6 network, We follow following process for IPV6 network: http://www.brianjcoleman.com/tutorial-how-to-test-your-app-for-ipv6-compatibility/" and request to them your event will be held on the coming week so, please release application to store asap and let me know the flow of the application, where you find issue or crashes.
It works, I had done same thing with 4 application and they approved.