iOS8/iPhone6+ XPC 崩溃

标签 ios xcode ios8 iphone-6-plus

我有一个基于 iOS8 SDK 构建的应用程序,我将其归档然后签署临时分发。

这已经在所有设备上运行了 2 年,并进行了各种更新。现在我有一部 iPhone 6 plus。

该应用程序在新安装后第一次运行良好,但现在它不断崩溃并出现错误:

"XPC API Misuse: Given object not of required type"

这发生在它进入 didFinishLaunchingWithOptions 之前

调用堆栈:

线程 0 名称:XPC API 滥用:给定对象不是所需类型。调度队列:com.apple.main-thread 线程 0 崩溃: 0 libxpc.dylib 0x0000000197dd99d8 _xpc_api_misuse + 60 1 libxpc.dylib 0x0000000197dd99d4 _xpc_api_misuse + 56 2 libxpc.dylib 0x0000000197dc9ae8 xpc_dictionary_set_value + 88 3 libxpc.dylib 0x0000000197dc5538 xpc_dictionary_set_string + 48 4 核心基础 0x0000000186e4b590 _CFXNotificationRemoveObservers + 912 5 基金会 0x0000000187d1ff20 -[NSNotificationCenter removeObserver:name:object:] + 252 6 UIKit 0x000000018b8588e4 -[UITableView dealloc] + 96 7 UIKit 0x000000018b6bf510 -[UIView(Hierarchy) removeFromSuperview] + 696 8 UIKit 0x000000018b79cb24 -[UIScrollView removeFromSuperview] + 76 9 UIKit 0x000000018b6c219c -[UIView dealloc] + 444 10 CoreFoundation 0x0000000186e217e4 CFRelease + 520 11 核心基础 0x0000000186e2dda4 -[__NSArrayM dealloc] + 148 12 libobjc.A.dylib 0x0000000197599720(匿名命名空间)::AutoreleasePoolPage::pop(void*) + 560 13 核心基础 0x0000000186e25400 _CFAutoreleasePoolPop + 24 14 基础 0x0000000187d1f180 -[NSAutoreleasePool 释放] + 144 15 UIKit 0x000000018b72f9ac -[UIApplication_run] + 584 16 UIKit 0x000000018b72a980 UIApplicationMain + 1484 17 HelloWorld 0x000000010000636c 主要 (main.m:16) 18 libdyld.dylib 0x0000000197beea04 开始 + 0

有人能帮忙吗?

最佳答案

我在自己的应用中修复了崩溃问题,但无法 100% 查明根本原因。我怀疑这是内存损坏或过度保留对象。

关键是 [UITableView dealloc] 我在 TableView 中实现了 dealloc 以查看问题发生的位置。我最终将其追溯到从 .xib 文件实例化的 UITableViewCell。这个特定的 .xib 包含多个 UITableViewCell。在给每个 TableView 它自己的 .xib 之后,崩溃消失了。

关于iOS8/iPhone6+ XPC 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26417492/

相关文章:

ios - SwiftUI - 使用 SwiftUI 创建单条虚线

ios - 如何处理: UIActionSheet deprecated (iOS8) X UIAlertController not supported (iOS7)

ios - mediaTypesRequiringUserActionForPlayback 无法工作 Swift

ios - 将 Storyboard 中的 UISwitch 连接到预先存在的 Outlet 和 IBAction

IOS 测试 : KIF vs Instruments/Automation

iphone - 使用segue将Int从一个ViewController传递到另一个

ios - 导出项目进行本地化时 Xcode 崩溃

iphone - 出于开发目的,如何将 iPod 5.0 升级到 5.1(而不是 6.0)?

ios - XCode 中的单 Storyboard与多 Storyboard,哪个更好

swift - 如何在 MapKit IOS8 和 Swift 中设置 map 边界