0
我有一個問題,不時發生,我找不到 的解決方案,有人可以幫助我嗎?由於EXC_BAD_ACCESS(SIGSEGV)和KERN_INVALID_ADDRESS在0xa0000008
這裏是崩潰的日誌,並在方法調用
0 libobjc.A.dylib 0x00003fb0 objc_msgSend + 16
1 Authentic 0x00048ce2 -[JobsSubtitleView touchUp:] (JobsSubtitleView.m:172)
2 CoreFoundation 0x00026486 -[NSObject performSelector:withObject:withObject:] + 46
3 UIKit 0x00032bf8 -[UIApplication sendAction:to:from:forEvent:] + 56
4 UIKit 0x00032bb4 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 24
5 UIKit 0x00032b92 -[UIControl sendAction:to:forEvent:] + 38
6 UIKit 0x00032902 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 486
7 UIKit 0x0003307a -[UIControl touchesEnded:withEvent:] + 470
8 UIKit 0x00031914 -[UIWindow _sendTouchesForEvent:] + 312
9 UIKit 0x0003133a -[UIWindow sendEvent:] + 374
10 UIKit 0x000076e6 -[UIApplication sendEvent:] + 350
11 UIKit 0x000070d2 _UIApplicationHandleEvent + 5802
12 GraphicsServices 0x00004f44 PurpleEventCallback + 876
13 CoreFoundation 0x00083a28 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
14 CoreFoundation 0x000839ca __CFRunLoopDoSource1 + 134
15 CoreFoundation 0x000825f0 __CFRunLoopRun + 1364
16 CoreFoundation 0x00023f72 CFRunLoopRunSpecific + 294
17 CoreFoundation 0x00023e3a CFRunLoopRunInMode + 98
18 GraphicsServices 0x0000411e GSEventRunModal + 150
19 UIKit 0x00002472 UIApplicationMain + 1074
20 Authentic 0x0006bbd0 main (main.m:17)
21 Authentic 0x00002e8c start + 32
- (void) touchUp:(id)sender {
if(![[UIApplication sharedApplication] isNetworkActivityIndicatorVisible]) {
UIButton *jobsSubtitleButton = (UIButton*)sender;
[jobsSubtitleButton setSelected:!jobsSubtitleButton.selected];
[jobsViewController setClickType:YES]; /*** LINE 172 ***/
if(![jobsViewController isSearching]) {
[jobsViewController setIsSearching:YES];
if([jobsViewController clickType]) {
[self performSelector:@selector(reloadJobs) withObject:nil afterDelay:1.0f];
} else {
[self performSelector:@selector(reloadJobs) withObject:nil];
}
}
}
}
'''jobsViewController'''初始化在哪裏? –
jobsViewController在initWithFrame:frame方法中被初始化,touchUp方法被4個按鈕調用,女巫可以同時全部,我做了一個簡單的改變,setClickType YES只有當clickType是NO時。可以爲此嗎?謝謝 – ruiaureliano
如果你能夠重新創建這個崩潰,你能確定崩潰發生時調試器中顯示的jobsViewController的值嗎?這種情況看起來像是在崩潰場景中指針可能不正確。 –