Facebook SDK FBSession infinite loop and crash

ⅰ亾dé卋堺 提交于 2019-12-12 12:26:30

问题


I originally used FBLoginView to start the login process in the latest Facebook SDK (3.5). However, that would crash the app because of a loop of some sort. I then read that I should try logging in using the code below as a test:

[FBSession openActiveSessionWithReadPermissions:[NSArray arrayWithObjects:@"read_stream", nil] allowLoginUI:YES
                          completionHandler:^(FBSession *session,
                                              FBSessionState status,
                                              NSError *error) {
                              // session might now be open.
                              NSLog(@"Error - %@", error);
                          }];

I got exactly the same issue. A huge number of processes (with the same name) get called and the app crashes. Does anyone know why this would happen when using the Facebook SDK? Here is an image of the thread that crashes:

As you can see there's something not right here. Anyone got any ideas?

Regards,
Mike


回答1:


I had the same issue, and tried setting sandboxing (in fb app dashboard) to false, and then it worked...




回答2:


This was a bug and is now fixed.

Edited -- This has been fixed on both client and server as of the Facebook SDK 3.5.1 for iOS. Here is the link: https://developers.facebook.com/resources/facebook-ios-sdk-3.5.1.pkg

--

Thanks for notifying us of this problem!




回答3:


I'm having what seems to be the exact same problem, and nearly the same stacktrace,but I already have sandboxing disable, in fact, my app has been in production for 9 months, but we were using still sdk 2.0 and just gotten around to upgrade it.

I have narrowed It down a lot. Here I give a good explanation about my problem, and a temporary solution that fixes my problem, but It's viable for production.. Facebook SDK FBLoginView getting EXC_BAD_ACCESS



来源:https://stackoverflow.com/questions/16131398/facebook-sdk-fbsession-infinite-loop-and-crash

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!