第二次启动后在设备上运行时崩溃 [英] Crash when running on device after second launch

查看:625
本文介绍了第二次启动后在设备上运行时崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是工程师,因此在我的简单气象应用程序中发生的这次崩溃有点不堪重负,该应用程序可以同时显示摄氏温度和华氏温度。我只更新到iOS 13 SDK,并更改了夜间模式的一些颜色。



应用程序在模拟器中运行良好,从Xcode启动时在设备上也可以正常运行。但是,当硬关闭应用程序并在设备上重新启动时,出现以下崩溃。我不知道如何调试崩溃,所以不胜感激!

 事件标识符:FFECFBCF-3BAB-4372- BA17-CC76247FE9CA 
CrashReporter密钥:bea3dbf6e834f42395b8e4d8102edeea44de5564
硬件型号:iPhone10,6
进程:FranzFahrenheit [11575]
路径:/ private / var / containers / Bundle / Application- / C9A0 773A-41B4-9D1D-24C915EFDF77 / FranzFahrenheit.app / FranzFahrenheit
标识符:com.bjoernschefzyk.franz
版本:51(2.4)
代码类型:ARM-64(本机)
角色:前景
父进程:已启动[1]
联盟:com.bjoernschefzyk.franz [3643]


日期/时间:2019-10-12 13:45:33.8086 -0700
启动时间:2019-10-12 13:45:33.4430 -0700
操作系统版本:iPhone OS 13.1.2(17A861)
发行类型:用户
基带版本:3.01.01
报告版本:104

例外类型:EXC_CRASH(SIGABRT)
异常代码:0x0000000000000000,0x0000000000000000
异常注:EXC_CORPSE_NOTIFY
由线程触发:0

应用程序特定信息:
abort ()称为

最后一个异常回溯:
0 CoreFoundation 0x1c258c98c __exceptionPreprocess + 220
1 libobjc.A.dylib 0x1c22b50a4 objc_exception_throw + 55
2 CoreFoundation 0x1c2482054 + [NSException提高:: format:] + 107
3 UIFoundation 0x1c5b356f8 UINibDecoderDecodeObjectForValue + 407
4 UIFoundation 0x1c5b35a6c UINibDecoderDecodeObjectForValue + 1291
5 UIFoundation 0x1c5ad1ec8-[UINibDecoder解码对象ForKey [] UIView initWithCoder:] + 779
7 UIKitCore 0x1c6940f98-[UIStackView initWithCoder:] + 67
8 UIFoundation 0x1c5b35838 UINibDecoderDecodeObjectForValue + 727
9 UIFoundation 0x1c5b35a6c UINibDecoderDecodeObjectForValue + 1291
10 UIFoundation 0x1c5ad1ec8-[UINibDecoder encodeObjectForKey:] + 315
11UIKitIn5 -Found $ 0 $ 1 $ 69 0x1c5b35838 UINibDecoderDecodeObjectForValue + 727
13 UIFoundation 0x1c5ad1ec8-[UINibDecoder encodeObjectForKey:] + 315
14 UIKitCore 0x1c6247c7c-[UIRuntimeConnection initWithCoder:] + 171
15InFoundDeValueObject 0838 0x1c5b35a6c UINibDecoderDecodeObjectForValue + 1291
17 UIFoundation 0x1c5ad1ec8-[UINibDecoder encodeObjectForKey:] + 315
18 UIKitCore 0x1c6242cc8-[NSCoder + 6917320(UIIBDependencyInjectionInternal)_decod eObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 487
19 UIKitCore 0x1c62458b8-[UINib InstantiateWithOwner:options:] + 1111
20 UIKitCore 0x1c5f8cb4c-[UIViewController _loadViewFromNibNamed:bundb $:] + UIKitCore 0x1c5f8d5d8-[UIViewController loadView] + 175
22 UIKitCore 0x1c5f8d890-[UIViewController loadViewIfRequired] + 171
23 UIKitCore 0x1c5f8df94-[UIViewController view] + 27
24 UIKitCore0x1cSet1 :animated:completion:] + 511
25 UIKitCore 0x1c5f1db78-[UIPageViewController setViewControllers:direction:animated:completion:] + 263
26 FranzFahrenheit 0x102219c78 0x102210000 + 40056
27 FranzFahrenheit 0x102988 b $ b 28弗朗兹·华氏温度0x102218e80 0x102210000 + 36480
29 UIKitCore 0x1c5f8907c-[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 99
30 UIKitCore 0x1c5f8db8c-[UIViewController loadViewIfx)+ 935
31_Kit_View:Controller_eView b $ b 32 UIKitCore 0x1c5f00174-[UINavigationController _startTransition:fromViewController:toViewController:] + 175
33 UIKitCore 0x1c5f00fa8-[UINavigationController _startDeferredTransitionIfNeeded:] + 1135
34 UIKitCore 0x1c5f022 b 35 UIKitCore 0x1c5ee6060-[UILayoutContainerView layoutSubviews] + 223
36 UIKit 0x1f745efac-[UILayoutContainerViewAccessibility layoutSubviews] + 47
37 UIKi tCore 0x1c6a25270-[UIView + 15184496(CALayerDelegate)layoutSublayersOfLayer:] + 2139
38 QuartzCore 0x1c8f115f8-[CALayer layoutSublayers] + 283
39 QuartzCore 0x1c8f15e28 CA :: Layer :: edeed :: layed :: layed :: layed_:264 + 479
40 QuartzCore 0x1c8f21894 CA :: Layer :: layout_and_display_if_needed + 1443988(CA :: Transaction *)+ 135
41 QuartzCore 0x1c8e6a9f0 CA :: Context :: commit_transaction + 694768(CA :: Transaction *, + 303
42 QuartzCore 0x1c8e94890 CA :: Transaction :: commit + 866448()+ 675
43 UIKitCore 0x1c65b1b1c __34- [UIApplication _firstCommitBlock] _block_invoke_2 + 79
44 CoreFoundation 0x1c250a614_____ b 45 CoreFoundation 0x1c2509db4 __CFRunLoopDoBlocks + 263
46 CoreFoundation 0x1c2505030 _ _CFRunLoopRun + 1099
47 CoreFoundation 0x1c25048bc CFRunLoopRunSpecific + 463
48 GraphicsServices 0x1cc370328 GSEventRunModal + 103
49 UIKitCore 0x1c659a6d4 UIApplicationMain + 1935
50 FranzFahrenheit 0x10223dy。0x10223dy dylib 0x1c238f460开始+ 3


线程0名称:调度队列:com.apple.main-thread
线程0崩溃:
0 libsystem_kernel.dylib 0x00000001c2384ebc __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001c22a4c1c pthread_kill $ VARIANT $ armv81 + 192
2 libsystem_c.dylib 0x00000001c21f4824中止+ 100
3 libc ++ abi.dylib 0x00000001c234d7d4 __cxa_bad_cast 4 ++ abi.dylib 0x00000001c234d9c4 demangling_unexpected_handler + 6596()+ 0
5 libobjc.A.dylib 0x00000001c22b5358 _objc_terminate + 25432()+ 124
6 libc ++ abi.dylib 0x00000001c235a304 std :: __ terminate(void(*)+ 58116())+ 16
7 libc ++ abi.dylib 0x00000001c2359ed8 __cxa_rethrow + 144
8 libobjc .A.dylib 0x00000001c22b5258 objc_exception_rethrow + 40
9分配的CoreFoundation 0x00000001c250492c CFRunLoopRunSpecific + 576
10个分配GraphicsServices 0x00000001cc370328 GSEventRunModal + 104
11分配UIKitCore 0x00000001c659a6d4 UIApplicationMain + 1936
12分配FranzFahrenheit 0x000000010223b3dc 0x102210000 + 177116
13 libdyld.dylib 0x00000001c238f460 start + 4

线程1:
0 libsystem_pthread.dylib 0x00000001c22acad8 start_wqthread + 0

线程2:
0 libsystem_malloc .dylib 0x00000001c2275a98 nanov2_calloc $ VARIANT $ armv81 + 152
1 libsystem_malloc.dylib 0x00000001c2282924 malloc_zone_calloc + 140
2 libsystem_m alloc.dylib 0x00000001c2282924 malloc_zone_calloc + 140
3 libsystem_malloc.dylib 0x00000001c2283208 calloc + 32
4 libobjc.A.dylib 0x00000001c22c6910 class_createInstance + 40
5 libdispatch.dylib 0x000000 _ $$ os_real_6 + alloc_dy_real_alloc libdispatch.dylib 0x00000001c2230a90 dispatch_mach_msg_create $ VARIANT $ armv81 + 108
7 libdispatch.dylib 0x00000001c222d4a0 _dispatch_mach_merge_msg $ VARIANT $ armv81 + 136
8 libdispatch.dylib 0x000000 dylib 0x00000001c2241308 _dispatch_workloop_worker_thread + 268
10 libsystem_pthread.dylib 0x00000001c22a9fa4 _pthread_wqthread + 276
11 libsystem_pthread.dylib 0x00000001c22acae0 start_wqthread + 8 $$$$ c
解决方案

我遇到了相同的崩溃问题,然后我解决了我希望您分享以下我的解决方案,但这可能取决于您的应用程序。希望对您有帮助。





结果,我可以解决崩溃的问题!(这很奇怪。)我认为此问题应该归Xcode 11所有,并且需要由Xcode修复。


I am not an engineer, so a bit overwhelmed with this crash in my simple weather app that shows Celsius and Fahrenheit side by side. I only updated to iOS 13 SDK and changed some colors for night mode.

App runs fine in simulator and also launches fine on device when started out of Xcode. However, when hard closing app and re-launching on device I get the following crash. I have no idea how to debug crashes, so I'd appreciate any help!

Incident Identifier: FFECFBCF-3BAB-4372-BA17-CC76247FE9CA
CrashReporter Key:   bea3dbf6e834f42395b8e4d8102edeea44de5564
Hardware Model:      iPhone10,6
Process:             FranzFahrenheit [11575]
Path:                /private/var/containers/Bundle/Application/C9ADFBB0-773A-41B4-9D1D-24C915EFDF77/FranzFahrenheit.app/FranzFahrenheit
Identifier:          com.bjoernschefzyk.franz
Version:             51 (2.4)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.bjoernschefzyk.franz [3643]


Date/Time:           2019-10-12 13:45:33.8086 -0700
Launch Time:         2019-10-12 13:45:33.4430 -0700
OS Version:          iPhone OS 13.1.2 (17A861)
Release Type:        User
Baseband Version:    3.01.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:
0   CoreFoundation                  0x1c258c98c __exceptionPreprocess + 220
1   libobjc.A.dylib                 0x1c22b50a4 objc_exception_throw + 55
2   CoreFoundation                  0x1c2482054 +[NSException raise:format:] + 107
3   UIFoundation                    0x1c5b356f8 UINibDecoderDecodeObjectForValue + 407
4   UIFoundation                    0x1c5b35a6c UINibDecoderDecodeObjectForValue + 1291
5   UIFoundation                    0x1c5ad1ec8 -[UINibDecoder decodeObjectForKey:] + 315
6   UIKitCore                       0x1c69f5354 -[UIView initWithCoder:] + 779
7   UIKitCore                       0x1c6940f98 -[UIStackView initWithCoder:] + 67
8   UIFoundation                    0x1c5b35838 UINibDecoderDecodeObjectForValue + 727
9   UIFoundation                    0x1c5b35a6c UINibDecoderDecodeObjectForValue + 1291
10  UIFoundation                    0x1c5ad1ec8 -[UINibDecoder decodeObjectForKey:] + 315
11  UIKitCore                       0x1c69f5354 -[UIView initWithCoder:] + 779
12  UIFoundation                    0x1c5b35838 UINibDecoderDecodeObjectForValue + 727
13  UIFoundation                    0x1c5ad1ec8 -[UINibDecoder decodeObjectForKey:] + 315
14  UIKitCore                       0x1c6247c7c -[UIRuntimeConnection initWithCoder:] + 171
15  UIFoundation                    0x1c5b35838 UINibDecoderDecodeObjectForValue + 727
16  UIFoundation                    0x1c5b35a6c UINibDecoderDecodeObjectForValue + 1291
17  UIFoundation                    0x1c5ad1ec8 -[UINibDecoder decodeObjectForKey:] + 315
18  UIKitCore                       0x1c6242cc8 -[NSCoder+ 6917320 (UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 487
19  UIKitCore                       0x1c62458b8 -[UINib instantiateWithOwner:options:] + 1111
20  UIKitCore                       0x1c5f8cb4c -[UIViewController _loadViewFromNibNamed:bundle:] + 363
21  UIKitCore                       0x1c5f8d5d8 -[UIViewController loadView] + 175
22  UIKitCore                       0x1c5f8d890 -[UIViewController loadViewIfRequired] + 171
23  UIKitCore                       0x1c5f8df94 -[UIViewController view] + 27
24  UIKitCore                       0x1c5f1d924 -[UIPageViewController _setViewControllers:withScrollInDirection:animated:completion:] + 511
25  UIKitCore                       0x1c5f1db78 -[UIPageViewController setViewControllers:direction:animated:completion:] + 263
26  FranzFahrenheit                 0x102219c78 0x102210000 + 40056
27  FranzFahrenheit                 0x102218988 0x102210000 + 35208
28  FranzFahrenheit                 0x102218e80 0x102210000 + 36480
29  UIKitCore                       0x1c5f8907c -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 99
30  UIKitCore                       0x1c5f8db8c -[UIViewController loadViewIfRequired] + 935
31  UIKitCore                       0x1c5effe68 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 167
32  UIKitCore                       0x1c5f00174 -[UINavigationController _startTransition:fromViewController:toViewController:] + 175
33  UIKitCore                       0x1c5f00fa8 -[UINavigationController _startDeferredTransitionIfNeeded:] + 1135
34  UIKitCore                       0x1c5f022ec -[UINavigationController __viewWillLayoutSubviews] + 163
35  UIKitCore                       0x1c5ee6060 -[UILayoutContainerView layoutSubviews] + 223
36  UIKit                           0x1f745efac -[UILayoutContainerViewAccessibility layoutSubviews] + 47
37  UIKitCore                       0x1c6a25270 -[UIView+ 15184496 (CALayerDelegate) layoutSublayersOfLayer:] + 2139
38  QuartzCore                      0x1c8f115f8 -[CALayer layoutSublayers] + 283
39  QuartzCore                      0x1c8f15e28 CA::Layer::layout_if_needed+ 1396264 (CA::Transaction*) + 479
40  QuartzCore                      0x1c8f21894 CA::Layer::layout_and_display_if_needed+ 1443988 (CA::Transaction*) + 135
41  QuartzCore                      0x1c8e6a9f0 CA::Context::commit_transaction+ 694768 (CA::Transaction*, double) + 303
42  QuartzCore                      0x1c8e94890 CA::Transaction::commit+ 866448 () + 675
43  UIKitCore                       0x1c65b1b1c __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 79
44  CoreFoundation                  0x1c250a614 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 19
45  CoreFoundation                  0x1c2509db4 __CFRunLoopDoBlocks + 263
46  CoreFoundation                  0x1c2505030 __CFRunLoopRun + 1099
47  CoreFoundation                  0x1c25048bc CFRunLoopRunSpecific + 463
48  GraphicsServices                0x1cc370328 GSEventRunModal + 103
49  UIKitCore                       0x1c659a6d4 UIApplicationMain + 1935
50  FranzFahrenheit                 0x10223b3dc 0x102210000 + 177116
51  libdyld.dylib                   0x1c238f460 start + 3


Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x00000001c2384ebc __pthread_kill + 8
1   libsystem_pthread.dylib         0x00000001c22a4c1c pthread_kill$VARIANT$armv81 + 192
2   libsystem_c.dylib               0x00000001c21f4824 abort + 100
3   libc++abi.dylib                 0x00000001c234d7d4 __cxa_bad_cast + 0
4   libc++abi.dylib                 0x00000001c234d9c4 demangling_unexpected_handler+ 6596 () + 0
5   libobjc.A.dylib                 0x00000001c22b5358 _objc_terminate+ 25432 () + 124
6   libc++abi.dylib                 0x00000001c235a304 std::__terminate(void (*)+ 58116 ()) + 16
7   libc++abi.dylib                 0x00000001c2359ed8 __cxa_rethrow + 144
8   libobjc.A.dylib                 0x00000001c22b5258 objc_exception_rethrow + 40
9   CoreFoundation                  0x00000001c250492c CFRunLoopRunSpecific + 576
10  GraphicsServices                0x00000001cc370328 GSEventRunModal + 104
11  UIKitCore                       0x00000001c659a6d4 UIApplicationMain + 1936
12  FranzFahrenheit                 0x000000010223b3dc 0x102210000 + 177116
13  libdyld.dylib                   0x00000001c238f460 start + 4

Thread 1:
0   libsystem_pthread.dylib         0x00000001c22acad8 start_wqthread + 0

Thread 2:
0   libsystem_malloc.dylib          0x00000001c2275a98 nanov2_calloc$VARIANT$armv81 + 152
1   libsystem_malloc.dylib          0x00000001c2282924 malloc_zone_calloc + 140
2   libsystem_malloc.dylib          0x00000001c2282924 malloc_zone_calloc + 140
3   libsystem_malloc.dylib          0x00000001c2283208 calloc + 32
4   libobjc.A.dylib                 0x00000001c22c6910 class_createInstance + 40
5   libdispatch.dylib               0x00000001c2259a20 _os_object_alloc_realized + 40
6   libdispatch.dylib               0x00000001c2230a90 dispatch_mach_msg_create$VARIANT$armv81 + 108
7   libdispatch.dylib               0x00000001c222d4a0 _dispatch_mach_merge_msg$VARIANT$armv81 + 136
8   libdispatch.dylib               0x00000001c22479b0 _dispatch_event_loop_merge$VARIANT$armv81 + 148
9   libdispatch.dylib               0x00000001c2241308 _dispatch_workloop_worker_thread + 268
10  libsystem_pthread.dylib         0x00000001c22a9fa4 _pthread_wqthread + 276
11  libsystem_pthread.dylib         0x00000001c22acae0 start_wqthread + 8

解决方案

I encountered the same crash issue and then I resolved it. I would like you to share the following my solution, but it might depend on your app. I hope it would help you.

In this thread in Apple's forum, eskimo's comment saved me(By the way, eskimo always helps me in the forum). According to the comment, I knew I had to check console logs of my device in Console app and then I found the following log.

*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named MKMapView because no class named MKMapView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)'

Thanks to the log's instruction, I figured out there was a problem to link Maps.framework with my app binary. So I put Maps.framework into "Frameworks, Libraries, and Embedded Content" in Xcode.

As a result, I could resolved the crash issue!(That's weird.) I think this issue should be owned by Xcode 11 and it needs to be fixed by Xcode.

这篇关于第二次启动后在设备上运行时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆