0

我正在使用具有正确兼容性的 XCGLogger(我的 Swift 语言是 3.2,XCGLogger 版本是 5.0.5)

但是应用程序仍然崩溃并显示以下崩溃报告

8 XCGLogger 0x105994420 _T0s11_StringCoreV6appendyABFTfq4gXn_n + 280
9 XCGLogger 0x105994290 _T0S2SSaySSG19stringInterpolationd_tcfCTfq4nd_n     + 136
10 XCGLogger 0x1059a2784 _.  T09XCGLogger15BaseDestinationC7processyAA10LogDetailsV03logF0_tFTf4gn_n + 3168
11 XCGLogger 0x1059a0894 _T09XCGLogger15BaseDestinationCAA0C8ProtocolA2aDP7processyAA10LogDetailsV03logG0_tFTW + 596
12 XCGLogger 0x1059c0888 _T09XCGLoggerAAC5loglnyAB5LevelO_SS12functionNameSS04fileE0Si10lineNumbers10DictionaryVySSypG8userInfoypSgyc7closuretFTf4ngXgXnggn_n + 636
13 XCGLogger 0x1059bbbac _T09XCGLoggerAAC7verboseyypSgyXK_s12StaticStringV12functionNameAF04fileF0Si.   10lineNumbers10DictionaryVySSypG8userInfotFTm + 500
14 XCGLogger 0x1059baaa8 _T09XCGLoggerAAC5debugyypSgyXK_s12StaticStringV12functionNameAF04fileF0Si10lineNumbers10DictionaryVySSypG8userInfotF + 32
15 Quickride 0x104281c58 QRSessionManager.onResumeUserSession() throws -> () (QRSessionManager.swift:154)
16 Quickride 0x104544de4 specialized SessionManagerController.(resumeUserSession(sessionChangeCompletionListener : SessionChangeCompletionListener?) -> ()).(closure #2) (SessionManagerController.swift:84)
17 Quickride 0x104543cdc partial apply for SessionManagerController.(resumeUserSession(sessionChangeCompletionListener : SessionChangeCompletionListener?) -> ()).(closure #2) (SessionManagerController.swift)
18 Quickride 0x104133230 thunk (RideManagementModuleSessonHandler.swift)
19 libdispatch.dylib 0x1845c4a60 _dispatch_client_callout + 16
20 libdispatch.dylib 0x184601ff4 _dispatch_sync_invoke_and_complete + 56
21 Quickride 0x104541cc4 SessionManagerController.resumeUserSession(sessionChangeCompletionListener : SessionChangeCompletionListener?) -> () (SessionManagerController.swift:94)
22 Quickride 0x1044bd334 AppStartupHandler.(resumeUserSessionAndNavigateToAppropriateInitialView() -> ()).(closure #1) (AppStartupHandler.swift:33)
23 Quickride 0x104133230 thunk (RideManagementModuleSessonHandler.swift)
24 libdispatch.dylib 0x1845c4aa0 _dispatch_call_block_and_release + 24
25 libdispatch.dylib 0x1845c4a60 _dispatch_client_callout + 16
26 libdispatch.dylib 0x1846064e0 _dispatch_root_queue_drain + 876
27 libdispatch.dylib 0x184606110 _dispatch_worker_thread3 + 112
28 libsystem_pthread.dylib 0x1848f7fac _pthread_wqthread + 1176
29 libsystem_pthread.dylib 0x1848f7b08 start_wqthread + 4

这是发生崩溃的代码:

public func onResumeUserSession() throws {
    AppDelegate.getAppDelegate().log.debug("onResumeUserSession()")
    try validateUserSessionBeforeResuming()
}

请帮忙。

4

1 回答 1

0

您没有提供足够的信息或代码来真正深入研究这个问题。

但是,您使用的是超过一年的 XCGLogger 版本,以及旧版本的 Swift。你还在使用旧的 Xcode 版本吗?

我建议更新到 Xcode 10(我写这篇文章时的最新版本),将所有库(包括 XCGLogger)更新到最新版本,并将您的项目更新到 Swift 4.2。

去年有很多修复,我相信你会发现一旦你更新了这个崩溃就消失了。

于 2018-09-20T21:52:40.083 回答