2012-10-10 3 views
2

FBUserSettingsViewController를 사용하려고하는데이를 닫을 때마다 충돌이 발생합니다. 다음 코드를 사용하여 표시합니다.해제시 FBUserSettingsViewController가 충돌 함

FBUserSettingsViewController *userSettings = [[FBUserSettingsViewController alloc] initWithNibName:nil bundle:nil]; 
userSettings.readPermissions = @[]; 
userSettings.publishPermissions = @[@"publish_actions"]; 
userSettings.defaultAudience = FBSessionDefaultAudienceEveryone; 
userSettings.delegate = self; 
[self.navigationController pushViewController:userSettings animated:YES]; 

잘 표시되지만 "뒤로"를 누르 자마자 충돌이 발생합니다. 사람이 좋은 것 즉, I가 뭔가를 엉망 말해 수 있다면

#0 0x34ae85de in objc_msgSend() 
#1 0x00136916 in -[FBUserSettingsViewController dealloc] at /Users/jacl/src/release/ios-sdk/src/FBUserSettingsViewController.m:86 
#2 0x389e29c8 in -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:]() 
#3 0x389e249e in -[UINavigationTransitionView _notifyDelegateTransitionDidStopWithContext:]() 
#4 0x38978a82 in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:]() 
#5 0x389ed8ac in -[UIViewAnimationState animationDidStop:finished:]() 
#6 0x331a22e0 in CA::Layer::run_animation_callbacks(void*)() 
#7 0x30fe45da in _dispatch_client_callout() 
#8 0x30fe7e44 in _dispatch_main_queue_callback_4CF() 
#9 0x388c31b0 in __CFRunLoopRun() 
#10 0x3883623c in CFRunLoopRunSpecific() 
#11 0x388360c8 in CFRunLoopRunInMode() 
#12 0x30a3233a in GSEventRunModal() 
#13 0x389b7288 in UIApplicationMain() 
#14 0x00003424 in main at SNIP 

, 그러나 이것은 페이스 북 SDK에서이 문제를 다음과 같습니다 충돌이에서 EXC_BAD_ACCESS입니다.

답변

2

문제점을 발견했습니다. Facebook은 자신의 dealloc이 잘못된 것을 코딩했습니다.

- (void)dealloc { 
    [super dealloc]; 

    [_profilePicture release]; 
    [_connectedStateLabel release]; 
    [_me release]; 
    [_loginLogoutButton release]; 
    [_permissions release]; 
    [_backgroundImageView release]; 
    [_bundle release]; 
} 

이 잘못은, [슈퍼의 dealloc]이 항상 마지막에 호출하기로 예정되어 FBUserSettingsViewController 및 FBViewController에서

는 할당 해제의 등이 있습니다. 개체를 해체하기 전에 개체가 해체됩니다. 나는 순서를 바꿨고 (dealloc 마지막으로) 이제는 작동 중입니다. 나는 이것에 대한 버그를 제기 할 것이다.

+1

어디에서이 파일을 찾을 수 있습니까? – Chris

+0

이 버그가 발생하여 Colin이 설명한 것과 같은 방법으로 해결했습니다. 나는 GitHub에서 포크로 나의 수정을 밀었습니다. https://github.com/Tafkadasoh/facebook-ios-sdk를 참조하십시오. Btw. 콜린, 네 버그 신고에 관해서 성공 했니? FB devs로부터의 어떤 응답? 많은 버그가있는 것처럼 보이지만 그 중 아무 것도 수정하지 않습니다 : - / – Tafkadasoh