ios - 按下主页按钮时,应用程序崩溃(有时)

标签 ios xcode crash

我真的很困惑为什么会这样。

由于这是随机发生的

这是stacktrace,我无法弄清楚。

请帮忙

谢谢

2015-03-30 15:12:50.817 MarcoApp[1857:23629] -[NSIBPrototypingLayoutConstraint finishedLoading]: unrecognized selector sent to instance 0x7f929ccc8cf0
2015-03-30 15:12:50.908 MarcoApp[1857:23629] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSIBPrototypingLayoutConstraint finishedLoading]: unrecognized selector sent to instance 0x7f929ccc8cf0'
*** First throw call stack:
(
0   CoreFoundation                      0x000000010aa74a75 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x000000010a333bb7 objc_exception_throw + 45
2   CoreFoundation                      0x000000010aa7bd1d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3   CoreFoundation                      0x000000010a9d39dc ___forwarding___ + 988
4   CoreFoundation                      0x000000010a9d3578 _CF_forwarding_prep_0 + 120
5   CoreFoundation                      0x000000010aa447fc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
6   CoreFoundation                      0x000000010a944204 _CFXNotificationPost + 2484
7   Foundation                          0x0000000109e8ddf8 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
8   UIKit                               0x000000010b73baa7 -[UIApplication _handleApplicationDectivationWithScene:shouldForceExit:transitionContext:completion:] + 1054
9   UIKit                               0x000000010b748833 __88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke + 87
10  UIKit                               0x000000010b7487cd -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 349
11  UIKit                               0x000000010b73345a -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 486
12  FrontBoardServices                  0x00000001115ae243 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
13  CoreFoundation                      0x000000010a9a9c7c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
14  CoreFoundation                      0x000000010a99f9c5 __CFRunLoopDoBlocks + 341
15  CoreFoundation                      0x000000010a99f785 __CFRunLoopRun + 2389
16  CoreFoundation                      0x000000010a99ebc6 CFRunLoopRunSpecific + 470
17  GraphicsServices                    0x000000010e89ca58 GSEventRunModal + 161
18  UIKit                               0x000000010b735580 UIApplicationMain + 1282
19  MarcoApp                           0x0000000109184afe top_level_code + 78
20  MarcoApp                           0x0000000109184bda main + 42
21  libdyld.dylib                       0x000000010ee2b145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

最佳答案

很难看清代码,但是“无法识别的选择器发送到实例”意味着您有一个方法,该方法需要一个选择器(一个函数的名称)作为参数,并且该方法获得了一个无效的选择器(该函数的名称错误)。

关于ios - 按下主页按钮时,应用程序崩溃(有时),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29341394/

相关文章:

UIPageViewController 的 Ios 下拉刷新策略

iphone - 屏幕上的 CGRect 网格?

ios - 我的 AVPlayer 的本地路径视频出现字符串错误

android - React Native App 在启动时在 android 11 上崩溃而没有给出错误

ios - 我的 UE4 演示应用程序在启动后崩溃

ios - 如何在保持图像纵横比的同时创建具有动态大小的图像网格/砂浆而不裁剪?

ios - 从一个地方删除所有通知观察者

xcode - OSX Cocoa NSButton类型复选框 "Select all "问题,如何解决?

Swift 3 - 检查 WKWebView 是否已加载页面

java - Android应用在启动时崩溃