在ios Facebook SDK 3.0登录时的应用程序崩溃 [英] Application crash on login in ios Facebook SDK 3.0

查看:143
本文介绍了在ios Facebook SDK 3.0登录时的应用程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用使用Facebook验证。如果在设备上没有安装Facebook应用程序,它也可以正常工作,如果用户没有登录到Facebook应用程序,也适用于具有Facebook应用程序的设备。但是,如果用户已经登录到Facebook应用程序,我的应用程序会显示登录页面两三秒钟,并通过说

  -  [SBJsonParser errorTrace]:无法识别的选择器发送到实例0x48ad90 

崩溃日志显示异常类型:EXC_CRASH SIGTRAP)
任何身体请帮忙?

 堆栈跟踪:(
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 0x 0014bffb - [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分配基金会0x319626b3 - [NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 198
16分配基金会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_SOURC E0_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

/ pre>

解决方案

最后我通过添加

   - (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/

这篇关于在ios Facebook SDK 3.0登录时的应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆