Ios 如何诊断碰撞报告
我有一个UIViewController:DFUserChatViewController,它是从DFChatViewController继承的,在DFChatViewController初始化方法中,我有一个navigationItem.LeftBarButtonim和一个backAction方法Ios 如何诊断碰撞报告,ios,Ios,我有一个UIViewController:DFUserChatViewController,它是从DFChatViewController继承的,在DFChatViewController初始化方法中,我有一个navigationItem.LeftBarButtonim和一个backAction方法 - (id)init { self = [super init]; if (self) { ........... self.navigatio
- (id)init
{
self = [super init];
if (self)
{
...........
self.navigationItem.leftBarButtonItem = [[[DFBarBackButtonItem alloc] initWithTarget:self action:@selector(backAction:) image:nil] autorelease];
}
return self;
}
在DFUserChatViewController中,我覆盖了方法backAction:
#pragma mark - action
-(void)backAction:(id)sender
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
.............any other thing
.............
{
[self.navigationController popViewControllerAnimated:YES];
}
}
我使用crashlytics进行崩溃报告,今天我收到了一个崩溃报告
0
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x4000000c
raw
0
libobjc.A.dylib objc_msgSend + 5
1
DFmyPro
DFUserChatViewController.m line 349
-[DFUserChatViewController backAction:]
2
UIKit -[UIApplication sendAction:to:from:forEvent:] + 90
3
UIKit -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
4
UIKit -[UIControl sendAction:to:forEvent:] + 44
5
UIKit -[UIControl _sendActionsForEvents:withEvent:] + 374
6
UIKit -[UIControl touchesEnded:withEvent:] + 590
7
UIKit -[UIWindow _sendTouchesForEvent:] + 528
8
UIKit -[UIWindow sendEvent:] + 832
9
DFmyPro
DFShakeWindow.m line 46
-[DFShakeWindow sendEvent:]
10
UIKit -[UIApplication sendEvent:] + 196
11
UIKit _UIApplicationHandleEventQueue + 7098
12 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
13
CoreFoundation __CFRunLoopDoSources0 + 206
14
CoreFoundation __CFRunLoopRun + 622
15
CoreFoundation CFRunLoopRunSpecific + 522
16
CoreFoundation CFRunLoopRunInMode + 106
17
GraphicsServices GSEventRunModal + 138
18 UIKit UIApplicationMain + 1136
19
DFmyPro
main.m line 15
主要
我一次又一次地运行我的应用程序,但没有发现崩溃,我如何知道哪里出了问题所以,为了确保我理解你。。。第一块代码和后退按钮出口来自DFChatViewController,但第二块代码来自DFUserChatViewController,后者继承自DFChatViewController?您可以发布DFChatViewController的backAction:method吗?DFChatViewController有自己的backAction:method实现,DFUserChatViewController只是覆盖了它