My Xcode app has RevenueCat Purchases.configure(withAPIKey: "myApiKey") which runs fine in a device from Xcode. The same app crashes in TestFlight after 2 minutes even if left alone. I commented out Purchases.configure and it stopped crashing in TestFlight.
I need help.
2 Crash reports from my iPhone device:
Date/Time: 2022-06-29 13:51:48.0337 -0700
Launch Time: 2022-06-29 13:20:37.1510 -0700
OS Version: iPhone OS 15.5 (19F77)
Release Type: User
Baseband Version: 7.61.00
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Last Exception Backtrace:
0 CoreFoundation 0x18151fd0c __exceptionPreprocess + 216
1 libobjc.A.dylib 0x198d10ee4 objc_exception_throw + 56
2 CoreFoundation 0x18161e740 -[NSInvocation
retainArguments].cold.1 + 0
3 CoreFoundation 0x181617398 __CFReallocationFailed + 116
4 CoreFoundation 0x1814be03c __CFSafelyReallocate + 68
5 Foundation 0x182bcbff0 _convertJSONString + 208
6 Foundation 0x182bd9318 _writeJSONString + 80
7 Foundation 0x182c4a3cc ___writeJSONObject_block_invoke + 384
8 CoreFoundation 0x1814ca988 NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK + 16
9 CoreFoundation 0x1814e14f4 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 208
10 Foundation 0x182bd0c38 _writeJSONObject + 468
11 Foundation 0x182c42978 -[_NSJSONWriter dataWithRootObject:options:] + 84
12 Foundation 0x182c11aa8 +[NSJSONSerialization dataWithJSONObject:options:error:] + 116
13 Purchases 0x1055ea8a0 0x1055d8000 + 75936
14 Purchases 0x1055e9584 0x1055d8000 + 71044
15 Purchases 0x1055e9478 0x1055d8000 + 70776
16 Purchases 0x1055e1540 0x1055d8000 + 38208
17 Purchases 0x1055fd680 0x1055d8000 + 153216
18 PurchasesCoreSwift 0x105646638 0x10562c000 + 108088
19 PurchasesCoreSwift 0x105645cc0 0x10562c000 + 105664
20 Purchases 0x1055f619c 0x1055d8000 + 123292
21 Purchases 0x1055fd314 0x1055d8000 + 152340
22 Purchases 0x1055fd198 0x1055d8000 + 151960
23 Purchases 0x1055fbe64 0x1055d8000 + 147044
24 Purchases 0x1055fd128 0x1055d8000 + 151848
25 Purchases 0x1055fc790 0x1055d8000 + 149392
26 Purchases 0x105601078 0x1055d8000 + 168056
27 StoreKit 0x1a9cf3d94 __48-[SKPaymentQueue
_updatedTransactions:restored:]_block_invoke_2 + 64
28 libdispatch.dylib 0x1811df094 _dispatch_call_block_and_release + 24
29 libdispatch.dylib 0x1811e0094 _dispatch_client_callout + 16
30 libdispatch.dylib 0x1811c1858 _dispatch_main_queue_drain + 888
31 libdispatch.dylib 0x1811c14d0
_dispatch_main_queue_callback_4CF$VARIANT$armv81 + 36
32 CoreFoundation 0x1814db0c4 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12
33 CoreFoundation 0x1814985e8 __CFRunLoopRun + 2544
34 CoreFoundation 0x1814ab240 CFRunLoopRunSpecific + 572
35 GraphicsServices 0x1a1fad988 GSEventRunModal + 160
36 UIKitCore 0x183cab41c -[UIApplication _run] + 1080
37 UIKitCore 0x183a44b88 UIApplicationMain + 336
38 libswiftUIKit.dylib 0x197dfaee4 UIApplicationMain(::::) + 100
39 VGravesite 0x104953858 0x10494c000 + 30808
40 dyld 0x104e5c3d0 start + 444
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x1bbd0fbbc __pthread_kill + 8
1 libsystem_pthread.dylib 0x1dc763854 pthread_kill + 208
2 libsystem_c.dylib 0x18bc006ac abort + 124
3 libc++abi.dylib 0x198e08dd8 abort_message + 128
4 libc++abi.dylib 0x198df955c demangling_terminate_handler() + 300
5 libobjc.A.dylib 0x198d168f8 _objc_terminate() + 124
6 libc++abi.dylib 0x198e08274 std::__terminate(void (*)()) + 16
7 libc++abi.dylib 0x198e0821c std::terminate() + 60
8 libdispatch.dylib 0x1811e00a8 _dispatch_client_callout + 36
9 libdispatch.dylib 0x1811c1858 _dispatch_main_queue_drain + 888
10 libdispatch.dylib 0x1811c14d0 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 36
11 CoreFoundation 0x1814db0c4 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12
12 CoreFoundation 0x1814985e8 __CFRunLoopRun + 2544
13 CoreFoundation 0x1814ab240 CFRunLoopRunSpecific + 572
14 GraphicsServices 0x1a1fad988 GSEventRunModal + 160
15 UIKitCore 0x183cab41c -[UIApplication _run] + 1080
16 UIKitCore 0x183a44b88 UIApplicationMain + 336
17 libswiftUIKit.dylib 0x197dfaee4 UIApplicationMain(::::) + 100
18 VGravesite 0x104953858 0x10494c000 + 30808
19 dyld 0x104e5c3d0 start + 444
======================================
Date/Time: 2022-06-29 14:26:58.5713 -0700
Launch Time: 2022-06-29 14:25:59.1190 -0700
OS Version: iPhone OS 15.5 (19F77)
Release Type: User
Baseband Version: 7.61.00
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Kernel Triage:
VM - Compressor failed a blocking pager_get
VM - Compressor failed a blocking pager_get
VM - Compressor failed a blocking pager_get
VM - Compressor failed a blocking pager_get
VM - Compressor failed a blocking pager_get
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x1bbd0fbbc __pthread_kill + 8
1 libsystem_pthread.dylib 0x1dc763854 pthread_kill + 208
2 libsystem_c.dylib 0x18bc006ac abort + 124
3 libc++abi.dylib 0x198e08dd8 abort_message + 128
4 libc++abi.dylib 0x198df955c demangling_terminate_handler() + 300
5 libobjc.A.dylib 0x198d168f8 _objc_terminate() + 124
6 libc++abi.dylib 0x198e08274 std::__terminate(void (*)()) + 16
7 libc++abi.dylib 0x198e0821c std::terminate() + 60
8 libdispatch.dylib 0x1811e00a8 _dispatch_client_callout + 36
9 libdispatch.dylib 0x1811c1858 _dispatch_main_queue_drain + 888
10 libdispatch.dylib 0x1811c14d0
_dispatch_main_queue_callback_4CF$VARIANT$armv81 + 36
11 CoreFoundation 0x1814db0c4 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12
12 CoreFoundation 0x1814985e8 __CFRunLoopRun + 2544
13 CoreFoundation 0x1814ab240 CFRunLoopRunSpecific + 572
14 GraphicsServices 0x1a1fad988 GSEventRunModal + 160
15 UIKitCore 0x183cab41c -[UIApplication _run] + 1080
16 UIKitCore 0x183a44b88 UIApplicationMain + 336
17 libswiftUIKit.dylib 0x197dfaee4 UIApplicationMain(::::) + 100
18 VGravesite 0x1007cb858 0x1007c4000 + 30808
19 dyld 0x100e703d0 start + 444
I got a crash log from apple , to symbolicate it , I'm using the symbolicate crash.
However, I'm unable to get it done.
When I run the atos command
atos -arch arm64 -o MyApp.app.dSYM/Contents/Resources/DWARF/Myapp -l
0x1f1bc2000 0x00000001f1be50dc
for a line (which say thread 0 crashed from the log),
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001f1be50dc 0x1f1bc2000 + 143580
I got:
NSNotificationName.TimeOutUserInteraction.unsafeMutableAddressor (in MyApp) (InterractionUIApplication.swift:0)
Does this mean, NSNotificationName.TimeOutUserInteraction.unsafeMutableAddressor is causing the crash ?
From the Xcode device logs:I'm able to retrieve:
Last Exception Backtrace:
0 CoreFoundation 0x1d590a3a8 __exceptionPreprocess + 232
1 libobjc.A.dylib 0x1d4b0fd00 objc_exception_throw + 59
2 CoreFoundation 0x1d58229f8 -[NSObject+ 223736 (NSObject) doesNotRecognizeSelector:] + 143
3 CoreFoundation 0x1d590fd54 ___forwarding___ + 1411
4 CoreFoundation 0x1d5911b50 _CF_forwarding_prep_0 + 95
5 FBSDKCoreKit 0x105f67530 0x105f24000 + 275760
6 FBSDKCoreKit 0x105f673ac 0x105f24000 + 275372
7 FBSDKCoreKit 0x105f2df28 0x105f24000 + 40744
8 FBSDKCoreKit 0x105f2b0b0 0x105f24000 + 28848
9 FBSDKCoreKit 0x105f2afbc 0x105f24000 + 28604
10 FBSDKCoreKit 0x105f70fe0 0x105f24000 + 315360
11 FBSDKCoreKit 0x105f7078c 0x105f24000 + 313228
12 FBSDKCoreKit 0x105f2bb28 0x105f24000 + 31528
13 FBSDKCoreKit 0x105f34cac 0x105f24000 + 68780
14 Foundation 0x1d638115c __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_2 + 27
15 CoreFoundation 0x1d5878acc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 27
16 CoreFoundation 0x1d5878a8c ___CFXRegistrationPost_block_invoke + 67
17 CoreFoundation 0x1d5877f30 _CFXRegistrationPost + 419
18 CoreFoundation 0x1d5877bbc ___CFXNotificationPost_block_invoke + 99
19 CoreFoundation 0x1d57ee768 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1503
20 CoreFoundation 0x1d5877664 _CFXNotificationPost + 715
21 Foundation 0x1d62727c4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 71
22 UIKitCore 0x202bd2398 -[UIApplication _stopDeactivatingForReason:] + 1339
23 UIKitCore 0x20247010c __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 487
24 UIKitCore 0x202470e5c _performActionsWithDelayForTransitionContext + 119
25 UIKitCore 0x20246feb8 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 259
26 UIKitCore 0x202474ea8 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 363
27 UIKitCore 0x2027bb904 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 479
28 FrontBoardServices 0x1d82ccc58 __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke_3 + 243
29 libdispatch.dylib 0x1d5319884 _dispatch_client_callout + 19
30 libdispatch.dylib 0x1d531ce5c _dispatch_block_invoke_direct + 251
31 FrontBoardServices 0x1d830918c __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 47
32 FrontBoardServices 0x1d8308e08 -[FBSSerialQueue _performNext] + 435
33 FrontBoardServices 0x1d8309404 -[FBSSerialQueue _performNextFromRunLoopSource] + 55
34 CoreFoundation 0x1d589a444 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 27
35 CoreFoundation 0x1d589a3c0 __CFRunLoopDoSource0 + 91
36 CoreFoundation 0x1d5899c7c __CFRunLoopDoSources0 + 179
37 CoreFoundation 0x1d5894950 __CFRunLoopRun + 987
38 CoreFoundation 0x1d5894254 CFRunLoopRunSpecific + 451
39 GraphicsServices 0x1d7ad3d8c GSEventRunModal + 107
40 UIKitCore 0x202bdc4c0 UIApplicationMain + 215
41 MyApp 0x104d97148 0x104d90000 + 29000
42 libdyld.dylib 0x1d5350fd8 start + 3
Code related to the notification:
import UIKit
// User Activity Timer
extension NSNotification.Name {
public static let TimeOutUserInteraction: NSNotification.Name = NSNotification.Name(rawValue: "TimeOutUserInteraction")
}
class InterractionUIApplication: UIApplication {
static let timeoutInSeconds: TimeInterval = 60 * 20 // 20 minutes
private var idleTimer: Timer?
private var enabledUserInteractionTracking: Bool = false
func startUserInternactionTracking() {
enabledUserInteractionTracking = true
resetIdleTimer()
}
func stopUserInternactionTracking() {
enabledUserInteractionTracking = false
if let idleTimer = idleTimer {
idleTimer.invalidate()
}
idleTimer = nil
}
override func sendEvent(_ event: UIEvent) {
super.sendEvent(event)
guard enabledUserInteractionTracking else {
return
}
if idleTimer != nil {
resetIdleTimer()
}
if let touches = event.allTouches {
for touch in touches {
if touch.phase == UITouch.Phase.began {
resetIdleTimer()
}
}
}
// Resent the timer because there was user interaction.
func resetIdleTimer() {
if let idleTimer = idleTimer {
idleTimer.invalidate()
}
idleTimer = Timer.scheduledTimer(timeInterval: InterractionUIApplication.timeoutInSeconds, target: self, selector: #selector(idleTimerExceeded), userInfo: nil, repeats: false)
}
// If the timer reaches the limit as defined in timeoutInSeconds, post this notification.
#objc func idleTimerExceeded() {
NotificationCenter.default.post(name: Notification.Name.TimeOutUserInteraction, object: nil)
}
}
This is the output I got from symbolicatecrash:
/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash -v unsymbolicated.crash > symbolicated.crash
Symbolicating unsymbolicated.crash ...
92791 characters read.
Use of uninitialized value $sdkGuess in concatenation (.) or string at /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash line 1369.
SDK guess for tool search is ''
otool path is '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool'
atos path is '/Applications/Xcode.app/Contents/Developer/usr/bin/atos'
symbols path is '/Applications/Xcode.app/Contents/Developer/usr/bin/symbols'
size path is '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/size'
Hardware Model xxx
OS Version 12.3.1 Build 16F203
1 binary images referenced:
MyApp (/var/containers/Bundle/Application/42051481-B8DA-47ED-A109-8E17F54C829A/MyApp.app/MyApp)
Num stacks found: 11
0 binary images remain after pruning:
($hwModel, $osVersion, $osBuild) = (xxx, 12.3.1, 16F203)
$versionPattern = {xxx 12.3.1 (16F203),xxx 12.3.1 (16F203) *,12.3.1 (16F203),12.3.1 (16F203) *,12.3.1,16F203,16F203 *}
Symbol directory paths: /Users/venkatanandamuri/Library/Developer/Xcode/iOS DeviceSupport/12.3.1 (16F203) arm64e/Symbols
Finding Symbols:
0 binary images were found.
No symbolic information found
The crash log I got is:
{"app_name":"MyApp","timestamp":"2019-06-28 11:45:18.77 -0700","app_version":"3.0.0","slice_uuid":"dc2048fb-776c-34d2-a7f3-0be90aa110c7","adam_id":1217032222,"build_version":"34","bundleID":"com.tes.mobile.ab11","share_with_app_devs":false,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 12.3.1 (16F203)","incident_id":"F61FEE35-605C-43A2-A0DE-3F64A3164371","name":"MyApp"}
Incident Identifier: F61FEE35-605C-43A2-A0DE-3F64A3164371
CrashReporter Key: 14224d89ad771b01037a2ad242ffbbbdda806dd4
Hardware Model: xxx
Process: MyApp [13107]
Path: /private/var/containers/Bundle/Application/42051481-B8DA-47ED-A109-8E17F54C829A/MyApp.app/Myapp
Identifier: com.test.mobile.ab11
Version: 34 (3.0.0)
AppStoreTools: 10G3
Code Type: ARM-64 (Native)
Role: Non UI
Parent Process: launchd [1]
Coalition: com.test.mobile.ab11 [6071]
Date/Time: 2019-06-28 11:45:18.5650 -0700
Launch Time: 2019-06-28 11:45:08.3705 -0700
OS Version: iPhone OS 12.3.1 (16F203)
Baseband Version: 7.70.01
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Last Exception Backtrace:
(0x1f204827c 0x1f12229f8 0x1f1f64ab8 0x1f204dac4 0x1f204f75c 0x101d674b8 0x101d67320 0x101d2dce0 0x101d2ae68 0x101d2ad74 0x101d70f68 0x101d70714 0x101d2b8e0 0x101d34708 0x1f1fb9318 0x1f1fb92e4 0x1f1fb87d8 0x1f1fb8484 0x1f1f31d64 0x1f1fb7f34 0x1f29a07f4 0x21e53ad0c 0x21de094a0 0x21de0a188 0x21de0925c 0x21de0df5c 0x21e13e054 0x1f49c45d8 0x1f1a887d4 0x1f1a2d5d8 0x1f49fe040 0x1f49fdcdc 0x1f49fe294 0x1f1fda018 0x1f1fd9f98 0x1f1fd9880 0x1f1fd47bc 0x1f1fd40b0 0x1f41d479c 0x21e544978 0x100cdf138 0x1f1a998e0)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001f1be50dc 0x1f1bc2000 + 143580
1 libsystem_pthread.dylib 0x00000001f1c5e094 0x1f1c5c000 + 8340
2 libsystem_c.dylib 0x00000001f1b3ef4c 0x1f1ae4000 + 372556
3 libsystem_c.dylib 0x00000001f1b3eeb4 0x1f1ae4000 + 372404
4 libc++abi.dylib 0x00000001f120b788 0x1f120a000 + 6024
5 libc++abi.dylib 0x00000001f120b934 0x1f120a000 + 6452
6 libobjc.A.dylib 0x00000001f1222e00 0x1f121d000 + 24064
7 MyApp 0x0000000100d5dd34 0x100cd8000 + 548148
8 libc++abi.dylib 0x00000001f1217838 0x1f120a000 + 55352
9 libc++abi.dylib 0x00000001f12178c4 0x1f120a000 + 55492
10 libdispatch.dylib 0x00000001f1a887e8 0x1f1a28000 + 395240
11 libdispatch.dylib 0x00000001f1a2d5d8 0x1f1a28000 + 21976
12 FrontBoardServices 0x00000001f49fe040 0x1f49b8000 + 286784
13 FrontBoardServices 0x00000001f49fdcdc 0x1f49b8000 + 285916
14 FrontBoardServices 0x00000001f49fe294 0x1f49b8000 + 287380
15 CoreFoundation 0x00000001f1fda018 0x1f1f30000 + 696344
16 CoreFoundation 0x00000001f1fd9f98 0x1f1f30000 + 696216
17 CoreFoundation 0x00000001f1fd9880 0x1f1f30000 + 694400
18 CoreFoundation 0x00000001f1fd47bc 0x1f1f30000 + 673724
19 CoreFoundation 0x00000001f1fd40b0 0x1f1f30000 + 671920
20 GraphicsServices 0x00000001f41d479c 0x1f41ca000 + 42908
21 UIKitCore 0x000000021e544978 0x21dc88000 + 9161080
22 MyApp 0x0000000100cdf138 0x100cd8000 + 28984
23 libdyld.dylib 0x00000001f1a998e0 0x1f1a98000 + 6368
Here is the code where the crash had occurred :-
private func dispatchMessageImmediately(topicName : String, mqttMessage : MQTTMessage){
AppDelegate.getAppDelegate().log.debug("Message: \(String(describing: mqttMessage.payloadString))")
let listener = self.topicToListenerMap?[topicName]
if listener != nil {
DispatchQueue.main.async(execute: { () -> Void in
MessageDispatchUtils.dispatchMessageToListeners(topicName: topicName, mqttMessage: mqttMessage, topicListener: listener!)
})
}
}
The Xcode version I am using is 9.3. My os version is iOS 11.4.1 Device is iPhone 5s. The crash is caused in libswift.dylib
Here is the crash report for the crash.Any help? Thanks in advance
Crashed: com.apple.main-thread
0 libsystem_platform.dylib 0x18358de38 _os_unfair_lock_recursive_abort + 36
1 libsystem_platform.dylib 0x18358ebb8 _os_unfair_lock_lock_slow + 264
2 libobjc.A.dylib 0x182b45720 objc_object::sidetable_clearDeallocating() + 104
3 libobjc.A.dylib 0x182b349d8 objc_destructInstance + 140
4 libswiftCore.dylib 0x10263ec0c swift_deallocClassInstance + 32
5 libswiftCore.dylib 0x10263eb4c _swift_release_dealloc + 28
6 Razorpay 0x1020f09b0 _T08Razorpay0A13UtilFunctionsC24handleUnhandledExceptionys5Int32V16havingSignalCode_SS03andI4NametFZTf4nnd_n + 248
7 libsystem_platform.dylib 0x183590b48 _sigtramp + 36
8 libobjc.A.dylib 0x182b45740 objc_object::sidetable_clearDeallocating() + 136
9 libobjc.A.dylib 0x182b45740 objc_object::sidetable_clearDeallocating() + 136
10 libobjc.A.dylib 0x182b349d8 objc_destructInstance + 140
11 libswiftCore.dylib 0x10263ec0c swift_deallocClassInstance + 32
12 libswiftCore.dylib 0x10263eb4c _swift_release_dealloc + 28
13 libswiftCore.dylib 0x1025750ec specialized String.debugDescription.getter + 4580
14 libswiftCore.dylib 0x1024bd66c protocol witness for CustomDebugStringConvertible.debugDescription.getter in conformance String + 290904
15 libswiftCore.dylib 0x1023da008 _debugPrint_unlocked<A, B>(_:_:) + 252544
16 libswiftCore.dylib 0x10257bc04 specialized _debugPrint<A>(_:separator:terminator:to:) + 31996
17 libswiftCore.dylib 0x10245a8fc Optional.debugDescription.getter + 68296
18 libswiftCore.dylib 0x10245aa4c protocol witness for CustomStringConvertible.description.getter in conformance <A> A! + 68632
19 libswiftCore.dylib 0x10257bf44 specialized _print_unlocked<A, B>(_:_:) + 32828
20 Quickride 0x10090c37c implicit closure #1 in EventServiceProxy.dispatchMessageImmediately(topicName:mqttMessage:) (EventServiceProxy.swift:238)
21 Quickride 0x1009186c4 partial apply for implicit closure #1 in EventServiceProxy.onNewMessageArrived(mqttMessage:) + 4314498756
22 XCGLogger 0x1021b86f4 _T09XCGLoggerAAC5loglnyAB5LevelO_SS12functionNameSS04fileE0Si10lineNumbers10DictionaryVySSypG8userInfoypSgyc7closuretFTf4ngXgXnggn_n + 232
23 XCGLogger 0x1021b3bac _T09XCGLoggerAAC7verboseyypSgyXK_s12StaticStringV12functionNameAF04fileF0Si10lineNumbers10DictionaryVySSypG8userInfotFTm + 500
24 XCGLogger 0x1021b2aa8 _T09XCGLoggerAAC5debugyypSgyXK_s12StaticStringV12functionNameAF04fileF0Si10lineNumbers10DictionaryVySSypG8userInfotF + 32
25 Quickride 0x100915144 specialized EventServiceProxy.dispatchMessageImmediately(topicName:mqttMessage:) (EventServiceProxy.swift:238)
26 Quickride 0x100916918 specialized EventServiceProxy.onNewMessageArrived(mqttMessage:) (EventServiceProxy.swift:145)
27 Quickride 0x10090d8c8 protocol witness for MqttCallback.onNewMessageArrived(mqttMessage:) in conformance EventServiceProxy (EventServiceProxy.swift)
28 Quickride 0x100cf309c specialized closure #1 in closure #4 in EventServiceConnection.createMqttConfig() (EventServiceConnection.swift:100)
29 Quickride 0x100cf29f4 partial apply for closure #1 in closure #4 in EventServiceConnection.createMqttConfig() (EventServiceConnection.swift)
30 Quickride 0x1008c19fc thunk for #callee_owned () -> () (RideManagementModuleSessonHandler.swift)
31 libdispatch.dylib 0x183260aa0 _dispatch_call_block_and_release + 24
32 libdispatch.dylib 0x183260a60 _dispatch_client_callout + 16
33 libdispatch.dylib 0x18326d65c _dispatch_main_queue_callback_4CF$VARIANT$mp + 1012
34 CoreFoundation 0x183917070 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
35 CoreFoundation 0x183914bc8 __CFRunLoopRun + 2272
36 CoreFoundation 0x183834da8 CFRunLoopRunSpecific + 552
37 GraphicsServices 0x18581a020 GSEventRunModal + 100
38 UIKit 0x18d854758 UIApplicationMain + 236
39 Quickride 0x1007d4bf0 main (AppDelegate.swift:26)
40 libdyld.dylib 0x1832c5fc0 start + 4
I got a crash for my own app on my iPhone, and am trying to figure out what happened. Here is the relevant part from the crash log in Xcode (sorry for the poor formatting):
Exception Type: EXC_CRASH (SIGABRT) Exception Codes:
0x0000000000000000, 0x0000000000000000 Exception Note:
EXC_CORPSE_NOTIFY Triggered by Thread: 0
Application Specific Information: abort() called
Filtered syslog: None found
Last Exception Backtrace: 0 CoreFoundation
0x1828c2d8c exceptionPreprocess + 228 1 libobjc.A.dylib
0x181a7c5ec objc_exception_throw + 55 2 CoreFoundation
0x1828d0098 -[NSObject+ 1388696 (NSObject) doesNotRecognizeSelector:]
+ 139 3 CoreFoundation 0x1828c85c8 ___forwarding_ + 1379 4 CoreFoundation 0x1827ae41c _CF_forwarding_prep_0 + 91 5 MyApp 0x102c33a0c 0x102bf0000 + 277004 6 MyApp
0x102c39d9c 0x102bf0000 + 302492 7 MyApp
0x102c1bed8 0x102bf0000 + 179928 8 MyApp
0x102c0754c 0x102bf0000 + 95564 9 libdispatch.dylib
0x1821b4aa0 _dispatch_call_block_and_release + 23 10
libdispatch.dylib 0x1821b4a60 _dispatch_client_callout +
15 11 libdispatch.dylib 0x1821f5bcc
_dispatch_main_queue_callback_4CF$VARIANT$armv81 + 527 12 CoreFoundation 0x18286b070
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 11 13 CoreFoundation 0x182868bc8 __CFRunLoopRun + 2271 14
CoreFoundation 0x182788da8 CFRunLoopRunSpecific + 551
15 GraphicsServices 0x18476e020 GSEventRunModal + 99 16
UIKit 0x18c7a8758 UIApplicationMain + 235 17
MyApp 0x102bf48f4 0x102bf0000 + 18676 18
libdyld.dylib 0x182219fc0 start + 3
Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0
Crashed: 0 libsystem_kernel.dylib 0x00000001823492e0
pthread_kill + 8 1 libsystem_pthread.dylib 0x00000001824ee6a8 pthread_kill$VARIANT$armv81 + 360 2
libsystem_c.dylib 0x00000001822b7d0c abort + 140 3
libc++abi.dylib 0x0000000181a532c8 __cxa_bad_cast + 0 4
libc++abi.dylib 0x0000000181a53470
default_unexpected_handler+ 5232 () + 0 5 libobjc.A.dylib
0x0000000181a7c8d4 _objc_terminate+ 35028 () + 124 6
libc++abi.dylib 0x0000000181a6d37c
std::__terminate(void ()+ 111484 ()) + 16 7 libc++abi.dylib
0x0000000181a6cccc __cxxabiv1::exception_cleanup_func+ 109772
(_Unwind_Reason_Code, _Unwind_Exception) + 0 8 libobjc.A.dylib
0x0000000181a7c720 _objc_exception_destructor+ 34592 (void*) + 0 9
CoreFoundation 0x00000001828d0098
__methodDescriptionForSelector + 0 10 CoreFoundation 0x00000001828c85c8 ___forwarding_ + 1380 11 CoreFoundation
0x00000001827ae41c _CF_forwarding_prep_0 + 92 12 MyApp
0x0000000102c33a0c 0x102bf0000 + 277004 13 MyApp 0x0000000102c39d9c 0x102bf0000 + 302492 14 MyApp 0x0000000102c1bed8 0x102bf0000 + 179928 15 MyApp 0x0000000102c0754c 0x102bf0000 + 95564 16 libdispatch.dylib 0x00000001821b4aa0 _dispatch_call_block_and_release + 24 17
libdispatch.dylib 0x00000001821b4a60
_dispatch_client_callout + 16 18 libdispatch.dylib 0x00000001821f5bcc _dispatch_main_queue_callback_4CF$VARIANT$armv81 +
528 19 CoreFoundation 0x000000018286b070
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12 20 CoreFoundation 0x0000000182868bc8 __CFRunLoopRun +
2272 21 CoreFoundation 0x0000000182788da8
CFRunLoopRunSpecific + 552 22 GraphicsServices
0x000000018476e020 GSEventRunModal + 100 23 UIKit
0x000000018c7a8758 UIApplicationMain + 236 24 MyApp
0x0000000102bf48f4 0x102bf0000 + 18676 25 libdyld.dylib 0x0000000182219fc0 start + 4
So I do see some errors but they are all non-specific, not pointing to a specific call.
Can I extract more info from this log or somewhere else to figure out what could have gone wrong?
I got a crash report, which is about unrecognized selector sent to instance when saving MKMapItem into Data Store. According to MKMapItem documents(MKMapItem Document), it conforms to NSSecureCoding, which means that it should have no problem to save it into an NSManagedObject instance. it looks fine on ios 11 version, as i didn't receive crash report from the device with this version. Also, I walkthrough the feature that possibly saving MKMapItem on my phone. the context does save the NKMapItem into data store and the feature is working. Since my phone is running IOS 11, so I am thinking it could be about the version system??
Please correct me if misunderstand something.
Here is the crash report.
OS Version: iPhone OS 10.3.3 (14G60)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x181646fe0 __exceptionPreprocess + 124 (NSException.m:165)
1 libobjc.A.dylib 0x1800a8538 objc_exception_throw + 56 (objc-exception.mm:521)
2 CoreFoundation 0x18164def4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 140 (NSObject.m:328)
3 CoreFoundation 0x18164af54 ___forwarding___ + 916 (NSForwarding.m:3126)
4 CoreFoundation 0x181546d4c _CF_forwarding_prep_0 + 92
5 Foundation 0x18209afd4 _encodeObject + 1176 (NSKeyedArchiver.m:873)
6 Foundation 0x1820a1e9c +[NSKeyedArchiver archivedDataWithRootObject:] + 168 (NSKeyedArchiver.m:421)
7 CoreData 0x18391ae28 -[NSSQLiteConnection execute] + 1952 (NSSQLiteConnection.m:4165)
8 CoreData 0x1839520e4 -[NSSQLiteConnection insertRow:] + 456 (NSSQLiteConnection.m:2966)
9 CoreData 0x183ae3df8 _writeChangesForSaveRequest + 824 (NSSQLCore_Functions.m:1561)
10 CoreData 0x183ae5584 _executeSaveChangesRequest + 388 (NSSQLCore_Functions.m:1622)
11 CoreData 0x183adb5f0 -[NSSQLSaveChangesRequestContext executeRequestUsingConnection:] + 44 (NSSQLSaveChangesRequestContext.m:103)
12 CoreData 0x1839f30c4 __52-[NSSQLDefaultConnectionManager handleStoreRequest:]_block_invoke + 256 (NSSQLConnectionManager.m:305)
13 libdispatch.dylib 0x1804fe9a0 _dispatch_client_callout + 16 (object.m:473)
14 libdispatch.dylib 0x18050bee0 _dispatch_barrier_sync_f_invoke + 84 (queue.c:3446)
15 CoreData 0x1839f2f64 -[NSSQLDefaultConnectionManager handleStoreRequest:] + 208 (NSSQLConnectionManager.m:290)
16 CoreData 0x183ab5824 -[NSSQLCoreDispatchManager routeStoreRequest:] + 272 (NSSQLCoreDispatchManager.m:56)
17 CoreData 0x183a2075c -[NSSQLCore dispatchRequest:withRetries:] + 236 (NSSQLCore.m:2726)
18 CoreData 0x183a1c578 -[NSSQLCore processSaveChanges:forContext:] + 200 (NSSQLCore.m:1569)
19 CoreData 0x183920f10 -[NSSQLCore executeRequest:withContext:error:] + 724 (NSSQLCore.m:1923)
20 CoreData 0x1839ff84c __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke + 3492 (NSPersistentStoreCoordinator.m:2820)
21 CoreData 0x1839f80f0 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 276 (NSPersistentStoreCoordinator.m:586)
22 CoreData 0x183920adc -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 408 (NSPersistentStoreCoordinator.m:2706)
23 CoreData 0x18394197c -[NSManagedObjectContext save:] + 2548 (NSManagedObjectContext.m:1419)
24 myappName 0x10009421c coreDataManager.saveContext() + 92 (coreDataManager.swift:514)
25 myappName 0x1000b5970 closure #1 in eventUpdateManager.observeValue(forKeyPath:of:change:context:) + 64 (eventUpdateManager.swift:138)
26 myappName 0x100124924 thunk for #escaping #callee_guaranteed () -> () + 36 (customAnimationController.swift:0)
27 libdispatch.dylib 0x1804fe9e0 _dispatch_call_block_and_release + 24 (init.c:963)
28 libdispatch.dylib 0x1804fe9a0 _dispatch_client_callout + 16 (object.m:473)
29 libdispatch.dylib 0x1805035e8 _dispatch_main_queue_callback_4CF + 996 (inline_internal.h:2431)
30 CoreFoundation 0x1815f50c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1793)
31 CoreFoundation 0x1815f2ce4 __CFRunLoopRun + 1572 (CFRunLoop.c:3004)
32 CoreFoundation 0x181522da4 CFRunLoopRunSpecific + 424 (CFRunLoop.c:3113)
33 GraphicsServices 0x182f8d074 GSEventRunModal + 100 (GSEvent.c:2245)
34 UIKit 0x1877ddc9c UIApplicationMain + 208 (UIApplication.m:4089)
35 myappName 0x10005da1c main + 56 (receiptCollectionViewCell.swift:18)
36 libdyld.dylib 0x18053159c start + 4
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000180641014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x000000018070b264 pthread_kill + 112 (pthread.c:1366)
2 libsystem_c.dylib 0x00000001805b59c4 abort + 140 (abort.c:91)
3 myappName 0x0000000100170ac8 uncaught_exception_handler + 72
4 CoreFoundation 0x0000000181647354 __handleUncaughtException + 628 (NSException.m:218)
5 libobjc.A.dylib 0x00000001800a8814 _objc_terminate() + 112 (objc-exception.mm:656)
6 myappName 0x0000000100155408 MSCrashesUncaughtCXXTerminateHandler() + 732 (MSCrashesCXXExceptionHandler.mm:171)
7 libc++abi.dylib 0x00000001800975d4 std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:68)
8 libc++abi.dylib 0x00000001800971a8 __cxa_rethrow + 144 (cxa_exception.cpp:584)
9 libobjc.A.dylib 0x00000001800a86f8 objc_exception_rethrow + 44 (objc-exception.mm:559)
10 CoreData 0x0000000183941cb0 -[NSManagedObjectContext save:] + 3368 (NSManagedObjectContext.m:1548)
11 myappName 0x000000010009421c coreDataManager.saveContext() + 92 (coreDataManager.swift:514)
12 myappName 0x00000001000b5970 closure #1 in eventUpdateManager.observeValue(forKeyPath:of:change:context:) + 64 (eventUpdateManager.swift:138)
13 myappName 0x0000000100124924 thunk for #escaping #callee_guaranteed () -> () + 36 (customAnimationController.swift:0)
14 libdispatch.dylib 0x00000001804fe9e0 _dispatch_call_block_and_release + 24 (init.c:963)
15 libdispatch.dylib 0x00000001804fe9a0 _dispatch_client_callout + 16 (object.m:473)
16 libdispatch.dylib 0x00000001805035e8 _dispatch_main_queue_callback_4CF + 996 (inline_internal.h:2431)
17 CoreFoundation 0x00000001815f50c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1793)
18 CoreFoundation 0x00000001815f2ce4 __CFRunLoopRun + 1572 (CFRunLoop.c:3004)
19 CoreFoundation 0x0000000181522da4 CFRunLoopRunSpecific + 424 (CFRunLoop.c:3113)
20 GraphicsServices 0x0000000182f8d074 GSEventRunModal + 100 (GSEvent.c:2245)
21 UIKit 0x00000001877ddc9c UIApplicationMain + 208 (UIApplication.m:4089)
22 myappName 0x000000010005da1c main + 56 (receiptCollectionViewCell.swift:18)
23 libdyld.dylib 0x000000018053159c start + 4