- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我的生活应用程序发生崩溃,我无法在我的设备上重现。我一直无法弄清楚是什么原因造成的。我研究了崩溃报告,但似乎无法理解造成这种情况的原因。
1 CoreFoundation __exceptionPreprocess + 1241536
2 libobjc.A.dylib objc_exception_throw + 34136
3 CoreFoundation -[NSObject(NSObject) doesNotRecognizeSelector:] + 1270388
4 CoreFoundation ___forwarding___ + 1258100
5 CoreFoundation _CF_forwarding_prep_0 + 185752
6 GLKit -[GLKViewController setPaused:] + 144836
7 GLKit -[GLKViewController _pauseByNotification] + 142828
8 CoreFoundation __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 823848
9 CoreFoundation _CFXRegistrationPost + 821548
10 CoreFoundation ___CFXNotificationPost_block_invoke + 820904
11 CoreFoundation -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1276824
12 CoreFoundation _CFXNotificationPost + 44016
13 Foundation -[NSNotificationCenter postNotificationName:object:userInfo:] + 26152
14 UIKit -[UIApplication _deactivateForReason:notify:] + 491392
15 UIKit __61-[UIApplication _sceneSettingsPreLifecycleEventDiffInspector]_block_invoke + 2711892
16 FrontBoardServices __52-[FBSSettingsDiffInspector inspectDiff:withContext:]_block_invoke.27 + 144868
17 Foundation __NSIndexSetEnumerate + 788368
18 BaseBoard -[BSSettingsDiff inspectChangesWithBlock:] + 208636
19 FrontBoardServices -[FBSSettingsDiff inspectOtherChangesWithBlock:] + 120484
20 FrontBoardServices -[FBSSettingsDiffInspector inspectDiff:withContext:] + 144320
21 UIKit __70-[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 2717116
22 UIKit -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 2716256
23 UIKit -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 6065056
24 FrontBoardServices __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.376 + 52104
25 FrontBoardServices __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 239800
26 FrontBoardServices -[FBSSerialQueue _performNext] + 239396
27 FrontBoardServices -[FBSSerialQueue _performNextFromRunLoopSource] + 240332
28 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 905844
29 CoreFoundation __CFRunLoopDoSources0 + 904124
30 CoreFoundation __CFRunLoopRun + 894908
31 CoreFoundation CFRunLoopRunSpecific + 36932
32 GraphicsServices GSEventRunModal + 49556
33 UIKit -[UIApplication _run] + 504568
34 UIKit UIApplicationMain + 483376
35 XXX main (XXXViewController.swift:14)
36 libdyld.dylib
start + 17844
第35行(只提到我写的代码)是XXXViewController类定义行:
class XXXViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
...
}
这个 ViewController 调用了一个观察者,这似乎是问题所在。我确保我删除了在 deinit 函数中使用它们的 ViewController 中的所有观察者。
deinit {
NSNotificationCenter.defaultCenter().removeObserver(self)
}
有没有人知道还有什么地方可能出了问题?
更新:我像这样注册观察者 ini init() (我应该改用 viewDidLoad 吗?):
NSNotificationCenter.defaultCenter().addObserver(self, selector:#selector(YViewController.dataUpdate(_:)), name: "DataChanged", object: nil)
然后像这样发布通知:
NSNotificationCenter.defaultCenter().postNotificationName("DataChanged", object: self, userInfo: nil)
YViewController 的数据更新如下:
func dataUpdate(notification: NSNotification) {
//Some stuff is done
}
我目前使用的是swift 2.0,崩溃发生在iOS 10.0.1-10.1.1版本
最佳答案
以防万一有人降落在这里。问题是我覆盖了 GLKViewController 的基本 View ,而不是将新 View 添加为 subview 。当我切换到 Crashlytics 时,这一点变得很清楚,它提供了有关崩溃的更多信息。
关于ios - EXC_SOFTWARE/UNCAUGHT_NS_EXCEPTION,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41083527/
我的生活应用程序发生崩溃,我无法在我的设备上重现。我一直无法弄清楚是什么原因造成的。我研究了崩溃报告,但似乎无法理解造成这种情况的原因。 1 CoreFoundation __exceptionPre
我一直在收到 Firebase 崩溃报告,但我不确定是什么导致了崩溃。我一直无法通过在 Xcode 中进行测试来重现错误,但崩溃影响了几个不同的用户,所以我知道这不是个别设备特定的崩溃。以下是我所知道
我是一名优秀的程序员,十分优秀!