iOS8/iPhone6 + XPC崩溃

tec*_*Mex 5 xcode ios ios8 iphone-6-plus

我在iOS8 SDK上构建了一个应用程序,我将其存档,然后签署adhoc发行版.

这已经在所有具有各种更新的设备上工作了2年.现在我有一个iPhone 6 plus.

应用程序在新安装后第一次正常运行,但现在它一直崩溃并出现错误:

"XPC API滥用:给定的对象不是必需的类型"

这发生在它进入之前 didFinishLaunchingWithOptions

调用堆栈:

Thread 0 name: XPC API Misuse: Given object not of required type. Dispatch queue: com.apple.main-thread Thread 0 Crashed: 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 CoreFoundation 0x0000000186e4b590 _CFXNotificationRemoveObservers + 912 5 Foundation 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 CoreFoundation 0x0000000186e2dda4 -[__NSArrayM dealloc] + 148 12 libobjc.A.dylib 0x0000000197599720 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 560 13 CoreFoundation 0x0000000186e25400 _CFAutoreleasePoolPop + 24 14 Foundation 0x0000000187d1f180 -[NSAutoreleasePool release] + 144 15 UIKit 0x000000018b72f9ac -[UIApplication _run] + 584 16 UIKit 0x000000018b72a980 UIApplicationMain + 1484 17 HelloWorld 0x000000010000636c main (main.m:16) 18 libdyld.dylib 0x0000000197beea04 start + 0

有人可以帮忙吗?

tec*_*Mex 1

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

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