且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在ios Facebook SDK 3.0登录时的应用程序崩溃

更新时间:2022-12-22 11:18:49

最后我通过添加

   - (id)errorTrace {
return [NSArray arrayWithObjects:@error1,nil];
}

在SBJsonParser中。我不知道它是如何工作的。



感谢上帝>>>>>>>>>>



进一步参考 http://developers.facebook.com/bugs/202230616574138/


My app uses Facebook Authentication. It works fine if there is no Facebook app installed on device and also works for devices having Facebook app if user in not logged in to Facebook app. But if the user is already logged in to the Facebook app my app shows login page for two or three seconds and crashes by saying

 -[SBJsonParser errorTrace]: unrecognized selector sent to instance 0x48ad90

the crash log shows Exception Type: EXC_CRASH (SIGTRAP) Any body please help?

Stack Trace: (
    0   CoreFoundation                      0x37aae8d7 __exceptionPreprocess + 186
    1   libobjc.A.dylib                     0x315941e5 objc_exception_throw + 32
    2   CoreFoundation                      0x37ab1acb -[NSObject doesNotRecognizeSelector:] + 174
    3   CoreFoundation                      0x37ab0945 ___forwarding___ + 300
    4   CoreFoundation                      0x37a0b680 _CF_forwarding_prep_0 + 48
    5   MyFbApp                            0x0014bf83 -[SBJSON objectWithString:allowScalar:error:] + 118
    6   MyFbApp                            0x0014bffb -[SBJSON objectWithString:error:] + 26
    7   MyFbApp                            0x0015030b -[FBRequestConnection parseJSONOrOtherwise:error:] + 94
    8   MyFbApp                            0x0014ff19 -[FBRequestConnection parseJSONResponse:error:statusCode:] + 100
    9   MyFbApp                            0x0014fcbb -[FBRequestConnection completeWithResponse:data:orError:] + 566
    10  MyFbApp                            0x0014e08f __68-[FBRequestConnection startWithCacheIdentity:skipRoundtripIfCached:]_block_invoke_0 + 174
    11  MyFbApp                            0x00151acf -[FBURLConnection invokeHandler:error:response:responseData:] + 482
    12  MyFbApp                            0x0015202b -[FBURLConnection connectionDidFinishLoading:] + 298
    13  Foundation                          0x31a0ac39 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 16
    14  Foundation                          0x319626e9 -[NSURLConnectionInternalConnection invokeForDelegate:] + 28
    15  Foundation                          0x319626b3 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 198
    16  Foundation                          0x319625d5 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 60
    17  CFNetwork                           0x36f8f8a5 _ZN19URLConnectionClient23_clientDidFinishLoadingEPNS_26ClientConnectionEventQueueE + 192
    18  CFNetwork                           0x36f84545 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl + 424
    19  CFNetwork                           0x36f84243 _ZN19URLConnectionClient13processEventsEv + 106
    20  CFNetwork                           0x36f84179 _ZN17MultiplexerSource7performEv + 156
    21  CoreFoundation                      0x37a82b03 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
    22  CoreFoundation                      0x37a822cf __CFRunLoopDoSources0 + 214
    23  CoreFoundation                      0x37a81075 __CFRunLoopRun + 652
    24  CoreFoundation                      0x37a044dd CFRunLoopRunSpecific + 300
    25  CoreFoundation                      0x37a043a5 CFRunLoopRunInMode + 104
    26  GraphicsServices                    0x37582fcd GSEventRunModal + 156
    27  UIKit                               0x34e94743 UIApplicationMain + 1090
    28  MyFbApp                            0x0007512d main + 236
    29  MyFbApp                            0x0007503c start + 40
)

At last I fixed my problem by adding

-(id) errorTrace{
    return [NSArray arrayWithObjects:@"error1", nil];
}

in SBJsonParser. I dont know how it worked.

Thank God>>>>>>>>>>

For further reference http://developers.facebook.com/bugs/202230616574138/