IOS3 で問題なく動作する iPad アプリが、IOS4.2 では失敗します。これには、オペレーション キューから http セッションを実行するクラスがあり、失敗はこのアクティビティにリンクされています。コンソール出力は次のとおりです。
Program received signal: “EXC_BAD_ACCESS”.
[Switching to thread 11523]
NSZombies を有効にして実行しても何も明らかにならなかったため、コードに NSLog ステートメントを追加したところ、ローカル変数が変更されたときにクラッシュが発生することがわかりました。コードセクションは次のとおりです。
self.currentOperation = [[[DeduceAccessOperation alloc] init] autorelease];
[self.currentOperation addObserver:self forKeyPath:@"isFinished"
options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld)
context:NULL];
NSLog (@"Start observer added");
[operationQueue addOperation:self.currentOperation];
NSLog (@"Start operation added");
NSLog(@"State is %d", self.status);
self.status = IEnablerServiceUpdating;
NSLog (@"State updated");
そして、コンソールログ出力は次のとおりです。
2010-12-08 21:26:44.548 UCiEnabler[5180:307] Start observer added
2010-12-08 21:26:44.550 UCiEnabler[5180:307] Start operation added
2010-12-08 21:26:44.552 UCiEnabler[5180:307] State is 1
Program received signal: “EXC_BAD_ACCESS”.
[Switching to thread 11523]
ステータスが読み取り専用になったようなものです(プロパティはアトミックおよび読み取り書き込みとして宣言されています)。
その他の関連情報は、サブビューが変更され、上記のルーチンの呼び出しがトリガーされることです。コードは次のとおりです。
//Start the update
UCiEnablerAppDelegate *controller = (UCiEnablerAppDelegate *)[[UIApplication sharedApplication] delegate];
[controller deduceIEnablerServiceAccess];
controller.serviceBusy = TRUE; //1.04
誰もこのようなものを見たことがありますか?
次にどこを見るべきか誰か考えがありますか?
よろしくロビン
スタック トレースは次のとおりです。
#0 0x34a80464 in objc_msgSend
#1 0x3119543e in NSKVOPendingNotificationCreate
#2 0x3119535a in NSKeyValuePushPendingNotificationPerThread
#3 0x3117009a in NSKeyValueWillChange
#4 0x311682c6 in -[NSObject(NSKeyValueObserverNotification) willChangeValueForKey:]
#5 0x311cc718 in _NSSetIntValueAndNotify
#6 0x000097ce in -[IEnablerService startDeducingAccessState] at IEnablerService.m:55
#7 0x00002bc0 in -[UCiEnablerAppDelegate deduceIEnablerServiceAccess] at UCiEnablerAppDelegate.m:100
#8 0x0000a33e in -[RootViewControlleriPad animationDidStop:finished:context:] at RootViewController-iPad.m:43
#9 0x341bb336 in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:]