我从apple获得了崩溃日志,以对其进行符号化,我正在使用符号化崩溃。
但是,我无法完成它。
当我运行atos命令
atos -arch arm64 -o MyApp.app.dSYM / Contents / Resources / DWARF / Myapp -l 0x1f1bc2000 0x00000001f1be50dc
对于一行(表示线程0从日志中崩溃),
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001f1be50dc 0x1f1bc2000 + 143580
我知道了
NSNotificationName.TimeOutUserInteraction.unsafeMutableAddressor (in MyApp) (InterractionUIApplication.swift:0)
这是否意味着NSNotificationName.TimeOutUserInteraction.unsafeMutableAddressor导致崩溃?
从Xcode设备日志中:我能够检索:
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
与通知相关的代码:
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)
}
}
这是我从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
我得到的崩溃日志是:
{"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