2013-04-29 4 views
0

내 IOS 응용 프로그램에 대한 버그 센스의 충돌 보고서를 재현 할 수 없으므로 디버그하지 마십시오. 하루에 200 번 이상 발생하기 때문에 꽤 심각합니다.디버그 objc_msg 충돌 재현을 허용하지 않습니다.

NSZombie에 대해 읽은 내용이 있지만 크래시를 재현 할 수 없으므로 쓸모가 없습니다. 그래서 여기에 내가 그들을 사용하는 방법에 대한 예입니다, 그들은 문제가 UIAlertView에있을 수 있다고 생각 몇 가지 유사한 스레드에

SIGSEGV 
0 libobjc.A.dylib 0x3aa515b0 objc_msgSend + 15 
1 UIKit 0x34d493df + 294 
2 UIKit 0x34cae469 + 52 
3 QuartzCore 0x34926099 + 160 
4 QuartzCore 0x34925ff1 + 64 
5 IOMobileFramebuffer 0x36ba1fd7 + 154 
6 IOKit 0x33920449 IODispatchCalloutFromCFMessage + 192 
7 CoreFoundation 0x32d035db + 118 
8 CoreFoundation 0x32d0e173 + 34 
9 CoreFoundation 0x32d0e117 + 138 
10 CoreFoundation 0x32d0cf99 + 1384 
11 CoreFoundation 0x32c7febd CFRunLoopRunSpecific + 356 
12 CoreFoundation 0x32c7fd49 CFRunLoopRunInMode + 104 
13 GraphicsServices 0x368562eb GSEventRunModal + 74 
14 UIKit 0x34b95301 UIApplicationMain + 1120 
15 My Bet main (main.m:16) Live 0x000705e7 0x6d000 + 13799 

: file.h

UIAlertView *alertView; 

에서 여기 은 충돌 보고서입니다 in file.m

어떻게 해결할 수 있습니까? 감사합니다.

답변

2

다른 스레드에서 UIAlertView을 해고 표시 한 것이 원인 일 수 있습니다.

다른 스레드에서는 UI 개의 작업을 수행하지 마십시오. 메인 스레드에서 UI 작업을 수행해야합니다.

같은 변경 function :

-(void)function 
{ 
// Do some web request 

dispatch_async(dispatch_get_main_queue(), ^{ 
    [alertView dismissWithClickedButtonIndex:0 animated:NO]; 
    if(response == nil) 
    { 
     UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Timeout", @"") message:NSLocalizedString(@"Connection timeout", @"") delegate:nil cancelButtonTitle:NSLocalizedString(@"Close", @"") otherButtonTitles:nil ]; 
    [alert show]; 
    } 
    }); 
} 
+0

IT는 dispatch_async 할 같은 없다 (dispatch_get_main_queue을()^{[0 애니메이션 : alertView dismissWithClickedButtonIndex 없음]}); 두 번째 경고를 표시하려면 다른 dispatch_async를 사용하십시오. – lorenzop

+0

@ user1187692 : P이 작업을 수행 할 필요가 없습니다 :) 이미 메인 쓰레드에'dispatch_get_main_queue'를 사용하고 있고, 다시 GCD와'dispatch_get_main_queue'를 사용할 필요가 없습니다. 이 줄들은 하나의'dispatch_get_main_queue' GCD에 쓸 수 있습니다. –