IOS3에서 잘 실행되는 iPad 앱은 IOS4.2에서 실패합니다. 작업 대기열에서 http 세션을 실행하는 클래스가 있으며 실패는이 활동에 연결됩니다.IOS4.2 앱이 EXC_BAD_ACCESS와 함께 종료됩니다.
Program received signal: “EXC_BAD_ACCESS”.
[Switching to thread 11523]
내가 코드에서 NSLog 문을 넣고 로컬 변수가 변경 될 때 충돌이 발생하는 것을 발견되었다, 그래서 아무것도 공개하지 않았다 활성화 NSZombies 실행 다음은 콘솔 출력됩니다. 여기
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]
그것은 읽기 전용 (그것의 속성은 원자와 READWRITE로 선언)이되었다 상태처럼 다음 코드 섹션입니다.
다른 관련 정보는 하위보기가 방금 변경되었으며 위의 루틴에서 호출을 트리거한다는 것입니다. 코드 :
//Start the update
UCiEnablerAppDelegate *controller = (UCiEnablerAppDelegate *)[[UIApplication sharedApplication] delegate];
[controller deduceIEnablerServiceAccess];
controller.serviceBusy = TRUE; //1.04
누구나 이런 사람이 보입니까?
아이디어가있는 곳은 어디입니까? NSOperations
를 시작할 때 아이폰 OS 4.2
#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:]
** 향후 ** 귀하의 질문을 검토하여 코드 형식이 올바른지 확인하십시오. – JeremyP
또한 디버거에서 실행하여 스택 추적을 가져 와서 여기에 게시하십시오. – JeremyP
충돌을 일으키는 상태에 대한 맞춤 설정 도구가 없을 가능성이 있습니까? 해당 줄에 중단 점을 설정하고 self.status = IEnablerServiceUpdating 단계를 수행하면 어떻게됩니까? – Rog