0

私のユーザーの 1 人が [UIAlertView disconnectWithClickedButtonIndex:animated:] の呼び出しによってクラッシュしたという通知を受け取りました。

現在、本番環境での 6 か月間の使用でこのようなクラッシュが発生したユーザーは1 人だけであるため、非常にまれなケースである必要があります

問題は、どんなにまれであっても未解決の問題を残すのは嬉しくないということです。

アプリ全体で UIAlertView が 1 つしかないことを知っていたので、疑わしいと思われるコードを簡単に突き止めることができました。しかし、それを見ると、なぜクラッシュするのか、半分困惑しています。私はデリゲートを設定しておらず、標準のキャンセル ボタンのみを使用しています。アプリは ARC を使用しているため、ポインターを取得していないため、自動解放する必要があります。

    UIAlertView *alert = [[UIAlertView alloc]
                      initWithTitle:@"Notice"
                      message:@"This App Requires Location Services and Region Monitoring to Be Enabled"
                      delegate:nil
                      cancelButtonTitle:@"OK"
                      otherButtonTitles:nil];
    [alert show];

クラッシュ レポートが間違ったコード チャンクを非難しているのでしょうか、それとも何か見落としているのでしょうか?

クラッシュログ:

Exception Type: EXC_BAD_ACCESS Code: KERN_INVALID_ADDRESS at 0xb1e2c0eb
0com.apple.main-thread Crashed
Latest crash : 5/03/2013 at 11:10:19 UTC-0700
0    libobjc.A.dylib     objc_msgSend + 15
1    UIKit   -[UIAlertView dismissWithClickedButtonIndex:animated:] + 256
2    UIKit   -[UIApplication sendAction:to:from:forEvent:] + 72
3    UIKit   -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
4    UIKit   -[UIControl sendAction:to:forEvent:] + 44
5    UIKit   -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 502
6    UIKit   -[UIControl touchesEnded:withEvent:] + 488
7    UIKit   -[UIWindow _sendTouchesForEvent:] + 524
8    UIKit   -[UIApplication sendEvent:] + 380
9    UIKit   _UIApplicationHandleEvent + 6154
10   GraphicsServices    _PurpleEventCallback + 590
11   GraphicsServices    PurpleEventCallback + 34
12 ...   CoreFoundation  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
4

0 に答える 0