无法理解这个仅影响iOS 4.3.x用户的符号化崩溃报告背后的真正原因

时间:2012-02-11 05:21:38

标签: iphone ios crash automatic-ref-counting

我的许多应用用户都遇到了以下崩溃。

仅影响iOS 4.3.x上的用户(设备可以是任意设备 - iPhone / iPad / iPod)

0    libobjc.A.dylib 0x34f00c98 objc_msgSend + 15
1    CoreFoundation 0x3134bc43 -[NSObject(NSObject) release] + 30
2    UIKit 0x314c900f -[UIViewController dealloc] + 174
3    UIKit 0x3151f0cd -[UITableViewController dealloc] + 124
4    MyApp 0x0001f985 -[WebNotesListViewController dealloc] (WebNotesListViewController.m:61)
5    CoreFoundation 0x3134bc43 -[NSObject(NSObject) release] + 30
6    MyApp 0x41b3 __arclite_objc_storeStrong (arclite.m:252)
7    MyApp 0x000bc44d -[CountTouchGR .cxx_destruct] (CountTouchGR.m:13)
8    libobjc.A.dylib 0x34f01961 object_cxxDestructFromClass + 52
9    libobjc.A.dylib 0x34f03b15 object_cxxDestruct + 12
10   libobjc.A.dylib 0x34f03b25 objc_destructInstance + 12
11   libobjc.A.dylib 0x34f01917 object_dispose + 26
12   CoreFoundation 0x3134bee5 -[NSObject(NSObject) dealloc] + 24
13   UIKit 0x314aead7 -[UIGestureRecognizer dealloc] + 346
14   UIKit 0x316aefc3 -[UISwipeGestureRecognizer dealloc] + 62
15   CoreFoundation 0x3134bc43 -[NSObject(NSObject) release] + 30
16   CoreFoundation 0x3134c1a1 CFRelease + 68
17   CoreFoundation 0x31352139 -[__NSArrayM removeObjectAtIndex:] + 88
18   CoreFoundation 0x3135a9dd -[NSMutableArray removeAllObjects] + 36
19   UIKit 0x31470fcf -[UIView(UIViewGestures) removeAllGestureRecognizers] + 174
20   UIKit 0x31470e6f -[UIView dealloc] + 294
21   UIKit 0x315b27e5 -[UIScrollView dealloc] + 252
22   UIKit 0x315bed0d -[UITableView dealloc] + 676
23   CoreFoundation 0x3134bc43 -[NSObject(NSObject) release] + 30
24   UIKit 0x314828df -[UIViewController setView:] + 270
25   UIKit 0x315759cb -[UIViewController unloadViewForced:] + 78
26   UIKit 0x315856b9 -[UIViewController unloadViewIfReloadable] + 16
27   UIKit 0x315cc12d -[UIViewController purgeMemoryForReason:] + 40
28   UIKit 0x315cc14d -[UIViewController didReceiveMemoryWarning] + 16
29   MyApp 0x0001fc3b -[WebNotesListViewController didReceiveMemoryWarning] (WebNotesListViewController.m:101)
30   UIKit 0x315cc163 -[UIViewController _didReceiveMemoryWarning:] + 14
31   Foundation 0x34c28183 _nsnote_callback + 142
32   CoreFoundation 0x313b620f __CFXNotificationPost_old + 402
33   CoreFoundation 0x31350eeb _CFXNotificationPostNotification + 118
34   Foundation 0x34c255d3 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
35   Foundation 0x34c271c1 -[NSNotificationCenter postNotificationName:object:] + 24
36   UIKit 0x315a2361 -[UIApplication _performMemoryWarning] + 48
37   UIKit 0x315a2d83 -[UIApplication _receivedMemoryNotification] + 126
38   UIKit 0x315a0507 _memoryStatusChanged + 42
39   CoreFoundation 0x313b6d69 __CFNotificationCenterDarwinCallBack + 24
40   CoreFoundation 0x313b3bdf __CFMachPortPerform + 210
41   CoreFoundation 0x313bea97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
42   CoreFoundation 0x313c083f __CFRunLoopDoSource1 + 166
43   CoreFoundation 0x313c160d __CFRunLoopRun + 520
44   CoreFoundation 0x31351ec3 CFRunLoopRunSpecific + 230
45   CoreFoundation 0x31351dcb CFRunLoopRunInMode + 58
46   GraphicsServices 0x30cd041f GSEventRunModal + 114
47   GraphicsServices 0x30cd04cb GSEventRun + 62
48   UIKit 0x31477d69 -[UIApplication _run] + 404
49   UIKit 0x31475807 UIApplicationMain + 670
50   MyApp 0x4239 main (main.m:14)

我无法破译真正的原因(可以转换为ARC与它有任何关系吗?)。

4 个答案:

答案 0 :(得分:2)

您正在向已经解除分配的对象发送消息。尝试使用NSZombies仪器重现崩溃。

此外,如果没有Zombies,请尝试在[WebNotesListViewController dealloc]的开头设置一个断点,然后单步执行直到遇到崩溃。

答案 1 :(得分:1)

似乎像WebNotesListViewController.m:101得到了内存警告。因此它(视图)被卸载并且在此过程中被解除分配。然后引用其中一个属性给出一个EXEC_BAD_ACCESS

答案 2 :(得分:1)

didReceiveMemoryWarning的{​​{1}}方法中,你正在做一些你不应该释放记忆的东西 - 很难确切地说出它与你的桌子有什么关系。

非常确定它与ARC转换有关,请查看代码在该方法中可能执行的操作。

编辑:

第二眼看,你的WebNotesListViewController课程中是否还有dealloc - 崩溃真的来自那个被解除分配的课程。

答案 3 :(得分:0)

问题与CountTouchGR班级有关... 我不知道确切的技术原因..但是它需要被声明为全局变量,而不是像之前所做的那样viewDidLoad

感谢所有尝试过帮助的人。