请帮助我解决或解决这个问题的根源。
我发现了一些可能与此问题重复的问题,但是在所有这些问题中,崩溃是他们应用程序中的一些代码,但在我的情况下,我注意到我的应用程序中没有代码被执行(甚至不是func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
)所以我怀疑它是否与任何其他问题重复。
基本观察:应用程序在启动时崩溃。
前提条件:当我的设备连接到没有互联网连接的某些wifi并且MyApp被置于后台并且设备已关闭一段时间(大多数是12小时或更长时间) ),现在打开设备并尝试单击应用程序图标以启动应用程序,但应用程序崩溃。
详细分析:我尝试调试此问题,但是每次按照上述前提条件创建时都不会轻易重新创建,但是当它发生时真的很令人沮丧,因为每次我们尝试时应用程序都会崩溃发布它(成功发布前超过10次)
附加的是使用XCode收集的日志>装置>设备控制台
申请名称: MyApp
Aug 8 12:02:25 iPad kernel[0] <Notice>: xpcproxy[330] Container: /private/var/mobile/Containers/Data/Application/19909EBC-CC8E-4099-BE03-65C2AF8F6466 (sandbox)
Aug 8 12:02:25 iPad kernel[0] <Notice>: Sandbox: MyApp(330) deny process-exec* /private/var/mobile/Containers/Bundle/Application/2B331890-D745-4149-BDDA-DE7EDECF118C/MyApp.app/MyApp
Aug 8 12:02:25 iPad locationd[64] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument)
Aug 8 12:02:25 iPad ReportCrash[331] <Notice>: ReportCrash acting against PID 330
Aug 8 12:02:25 iPad ReportCrash[331] <Notice>: Formulating crash report for process MyApp[330]
Aug 8 12:02:25 iPad com.apple.xpc.launchd[1] (UIKitApplication:com.myCompany.myApp[0x7d94][330]) <Notice>: Service exited due to signal: Abort trap: 6
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Not saving crash log because we have reached the limit for logs to store on disk. Sync or otherwise clear logs from /var/mobile/Library/Logs/CrashReporter to save new logs.
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Could not save crash report to disk!
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Incident Identifier: 5B7F8582-4388-4E91-A71B-896832561E6A
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: CrashReporter Key: 4a3c78e803aea554f9700490a971b9a91e21bd63
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Hardware Model: iPad3,6
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Process: MyApp [330]
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Path: /private/var/mobile/Containers/Bundle/Application/2B331890-D745-4149-BDDA-DE7EDECF118C/MyApp.app/MyApp
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Identifier: MyApp
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Version: ???
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Code Type: ARM (Native)
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Parent Process: launchd [1]
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Date/Time: 2017-08-08 12:02:25.455 +0530
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Launch Time: 2017-08-08 12:02:25.304 +0530
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: OS Version: iOS 8.1.2 (12B440)
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Report Version: 105
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Exception Type: EXC_CRASH (SIGABRT)
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Exception Codes: 0x0000000000000000, 0x0000000000000000
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Triggered by Thread: 0
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Thread 0 name: Dispatch queue: com.apple.main-thread
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Thread 0 Crashed:
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 0 libsystem_kernel.dylib 0x35f7adfc 0x35f66000 + 85500
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 1 libsystem_pthread.dylib 0x35ff8d32 0x35ff5000 + 15666
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 2 libsystem_c.dylib 0x35f1a904 0x35ed0000 + 305412
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 3 ...g_rt.asan_ios_dynamic.dylib 0x048cd9c0 0x4877000 + 354752
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 4 ...g_rt.asan_ios_dynamic.dylib 0x048ca10e 0x4877000 + 340238
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 5 ...g_rt.asan_ios_dynamic.dylib 0x048c4cd8 0x4877000 + 318680
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 6 ...g_rt.asan_ios_dynamic.dylib 0x048b971e 0x4877000 + 272158
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 7 dyld 0x1fe7fa1a 0x1fe71000 + 59930
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 8 dyld 0x1fe7fb20 0x1fe71000 + 60192
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 9 dyld 0x1fe7cf9e 0x1fe71000 + 49054
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 10 dyld 0x1fe7cf26 0x1fe71000 + 48934
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 11 dyld 0x1fe7cdf2 0x1fe71000 + 48626
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 12 dyld 0x1fe7d0c8 0x1fe71000 + 49352
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 13 dyld 0x1fe72e3c 0x1fe71000 + 7740
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 14 dyld 0x1fe763f4 0x1fe71000 + 21492
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 15 dyld 0x1fe72222 0x1fe71000 + 4642
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 16 dyld 0x1fe7203c 0x1fe71000 + 4156
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Thread 0 crashed with ARM Thread State (32-bit):
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x00000000
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: r4: 0x00000006 r5: 0x386839dc r6: 0x1fe98b60 r7: 0x04874020
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: r8: 0x00000000 r9: 0x386839dc r10: 0x00000093 r11: 0x00000400
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: ip: 0x00000148 sp: 0x04874014 lr: 0x35ff8d37 pc: 0x35f7adfc
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: cpsr: 0x00000010
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: Binary Images:
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 0xdb000 - 0x33a6fff MyApp armv7 <3341c8cdc7cc39d49fef358c4c48ef20> /var/mobile/Containers/Bundle/Application/2B331890-D745-4149-BDDA-DE7EDECF118C/MyApp.app/MyApp
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 0x4877000 - 0x48e6fff libclang_rt.asan_ios_dynamic.dylib armv7s <3fe196ea96903f038807adaca4005ced> /var/mobile/Containers/Bundle/Application/2B331890-D745-4149-BDDA-DE7EDECF118C/MyApp.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 0x4de7000 - 0x4df2fff libswiftAVFoundation.dylib armv7s <20c87a3924533c798c48642244a7a822> /var/mobile/Containers/Bundle/Application/2B331890-D745-4149-BDDA-DE7EDECF118C/MyApp.app/Frameworks/libswiftAVFoundation.dylib
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 0x4e03000 - 0x5082fff libswiftCore.dylib armv7s <7a6da327e6343442a09edeea51f6dcff> /var/mobile/Containers/Bundle/Application/2B331890-D745-4149-BDDA-DE7EDECF118C/MyApp.app/Frameworks/libswiftCore.dylib
Aug 8 12:02:25 iPad ReportCrash[331] <Error>: 0x5315000 - 0x5320fff libswiftCoreAudio.dylib armv7s <f800a3de6d733873ad4342aecedaaaf4> /var/mobile/Containers/Bundle/Application/2B331890-D745-4149-BDDA-DE7EDECF118C/MyApp.app/Frameworks/libswiftCoreAudio.dylib
.....Many other libraries (could not include due to text limit)
使用的语言: Swift3.0,
部署目标: 8.0
使用有效配置和证书进行签名。
更新 - 2017年8月8日星期二14:26:19 GMT + 05:30
我有时会在控制台中出现以下错误
Aug 8 14:24:03 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:03 iPad kernel[0] <Notice>: xpcproxy[408] Container: /private/var/mobile/Containers/Data/Application/B2F22E9F-350F-4936-98F0-9AE7DBFE7518 (sandbox)
Aug 8 14:24:03 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:03 iPad locationd[64] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
Aug 8 14:24:03 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:03 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:03 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:03 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:04 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:04 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:04 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:04 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:04 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:04 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:04 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:04 iPad amfid[172] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Aug 8 14:24:05 iPad MyApp[408] <Error>: assertion failed: 12B440: libxpc.dylib + 51947 [E83F44AC-48AF-3662-929E-FB7538661BB3]: 0x7d