我从https://github.com/mono/monotouch-bindings下载并构建了facebook-binding 身份验证有效,但当我尝试将某些内容发布到我的墙上时,我会遇到本机崩溃。 在“Post to Wall”对话框出现后,当我点击“取消”时以及点击“分享”时应用程序崩溃。实际的帖子成功发布到我的墙上,但崩溃不是很有趣:)
以下是本机堆栈跟踪:
at(wrapper managed-to-native)MonoTouch.UIKit.UIApplication.UIApplicationMain(int,string [],intptr,intptr) 在/Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29中的MonoTouch.UIKit.UIApplication.Main(string [],string,string)[0x00042] at sample.AppDelegate.Main(string [])[0x00000] in /Users/fusonic/Projects/facebook/sample/Main.cs:263 at(wrapper runtime-invoke).runtime_invoke_void_object(object,intptr,intptr,intptr)
0 sample 0x0009e72c mono_handle_native_sigsegv + 284
1 sample 0x00013ab8 mono_sigsegv_signal_handler + 248
2 libSystem.B.dylib 0x9474805b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 sample 0x000094f3 -[FBDialog webView:shouldStartLoadWithRequest:navigationType:] + 735
5 UIKit 0x0115b8d4 -[UIWebView webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 222
6 UIKit 0x0115d59e -[UIWebViewWebViewDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 77
7 CoreFoundation 0x0219551d __invoking___ + 29
8 CoreFoundation 0x02195437 -[NSInvocation invoke] + 167
9 CoreFoundation 0x021c049a -[NSInvocation invokeWithTarget:] + 74
10 WebKit 0x06b43aa4 -[_WebSafeForwarder forwardInvocation:] + 164
11 CoreFoundation 0x021960c9 ___forwarding___ + 889
12 CoreFoundation 0x02195ce2 _CF_forwarding_prep_0 + 50
13 CoreFoundation 0x0219551d __invoking___ + 29
14 CoreFoundation 0x02195437 -[NSInvocation invoke] + 167
15 WebCore 0x076e3ae3 _ZL11SendMessageP12NSInvocation + 35
16 WebCore 0x076e4115 _ZL20HandleDelegateSourcePv + 101
17 CoreFoundation 0x0220397f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
18 CoreFoundation 0x02166b73 __CFRunLoopDoSources0 + 243
19 CoreFoundation 0x02166454 __CFRunLoopRun + 1012
20 CoreFoundation 0x02165db4 CFRunLoopRunSpecific + 212
21 CoreFoundation 0x02165ccb CFRunLoopRunInMode + 123
22 GraphicsServices 0x03e95879 GSEventRunModal + 207
23 GraphicsServices 0x03e9593e GSEventRun + 114
24 UIKit 0x00fa5a9b UIApplicationMain + 1175
25 ??? 0x0d080a05 0x0 + 218630661
26 ??? 0x09ffaf18 0x0 + 167751448
27 ??? 0x09ffac10 0x0 + 167750672
28 ??? 0x09ffad66 0x0 + 167751014
29 sample 0x00017e22 mono_jit_runtime_invoke + 722
30 sample 0x00177d2e mono_runtime_invoke + 126
31 sample 0x0017be14 mono_runtime_exec_main + 420
32 sample 0x00181235 mono_runtime_run_main + 725
33 sample 0x00075025 mono_jit_exec + 149
34 sample 0x00010d2f main + 2202
35 sample 0x0000d5a9 start + 53
答案 0 :(得分:0)
好的,问题是因为GC正在收集Handler Delegate。保持对委托的引用时,该示例有效。