对于我的应用程序中的崩溃,NSDictionary是模型的一个属性,当模型执行cxx_destruct函数时,崩溃发生在and函数中。对于cow_cleanup,崩溃堆栈中有一个我不确定的地方,这个函数中发生了什么?崩溃的原因是在模型发布过程中,NSDictionary发生了变化,对吧?下面是具体的崩溃堆栈Thread 0 Crashed:
0 libobjc.A.dylib objc_release + 16
1 CoreFoundation cow_cleanup + 168
2 CoreFoundation -[__NSDictionaryM dealloc] + 144
3 imeituan -[CKContent .cxx_destruct] (CKContent.m:12)
4 libobjc.A.dylib object_cxxDestructFromClass(objc_object*, objc_class*) + 112
5 libobjc.A.dylib objc_destructInstance + 88
6 libobjc.A.dylib _objc_rootDealloc + 52
7 imeituan -[CKTableViewCell .cxx_destruct] (CKTableViewCell.m:44)
8 libobjc.A.dylib object_cxxDestructFromClass(objc_object*, objc_class*) + 112
9 libobjc.A.dylib objc_destructInstance + 88
10 libobjc.A.dylib _objc_rootDealloc + 52
11 UIKitCore -[UIResponder dealloc] + 152
12 UIKitCore -[UIView dealloc] + 872
13 UIKitCore -[UITableViewCell dealloc] + 236
14 imeituan -[CKBubbleCell dealloc (CKBubbleCell.m:222)
15 CoreFoundation -[__NSArrayM dealloc] + 228
16 UIKitCore -[UITableView .cxx_destruct] + 1524
17 libobjc.A.dylib object_cxxDestructFromClass(objc_object*, objc_class*) + 112
18 libobjc.A.dylib objc_destructInstance + 88
19 libobjc.A.dylib _objc_rootDealloc + 52
20 UIKitCore -[UIResponder dealloc] + 152
21 UIKitCore -[UIView dealloc] + 872
22 UIKitCore -[UIScrollView dealloc] + 852
23 UIKitCore -[UITableView dealloc] + 364
24 UIKitCore __destroy_helper_block_e8_32s40s + 24
25 libsystem_blocks.dylib _Block_release + 148
26 Foundation -[_NSTimerBlockTarget dealloc] + 44
27 Foundation _timerRelease + 64
28 CoreFoundation __CFRunLoopDoTimer + 936
29 CoreFoundation __CFRunLoopDoTimers + 276
30 CoreFoundation __CFRunLoopRun + 1640
31 CoreFoundation CFRunLoopRunSpecific + 424
32 GraphicsServices GSEventRunModal + 160
33 UIKitCore UIApplicationMain + 1932
34 imeituan main (main.m:38)
35 libdyld.dylib start + 4
发布于 2021-09-16 15:06:41
像这样的崩溃真的很棘手。要记住的关键是你在释放的过程中崩溃了。更具体地说,崩溃函数是objc_release
。对我来说,这强烈地表明你有一个过度释放的对象。在我看来,你的一个模型对象可能已经被释放了。问题不是直接出在字典上。
我建议使用NSZombies或Instruments中的其他内存分配工具来尝试跟踪内存管理问题所在的位置。
https://stackoverflow.com/questions/69209610
复制相似问题