FBUserSettingsViewController在closures时崩溃

我试图使用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]; 

它显示正常,但只要我点击“返回”,我得到一个崩溃。 崩溃是一个EXC_BAD_ACCESS:

 #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 

如果有人能告诉我,我搞砸了,那会很好,但是这看起来像Facebook SDK中的一个bug。

我发现这个问题。 Facebook编写了dealloc的错误。

在FBUserSettingsViewController和FBViewController中有dealloc的例如:

 - (void)dealloc { [super dealloc]; [_profilePicture release]; [_connectedStateLabel release]; [_me release]; [_loginLogoutButton release]; [_permissions release]; [_backgroundImageView release]; [_bundle release]; } 

这是错误的,[超级dealloc]应该总是被称为最后。 目标正在被拆除,然后才尝试释放其成员。 我切换顺序(dealloc最后),现在正在工作。 我会在这方面提出一个错误。