2014-09-11 56 views
0

此堆栈跟踪指示什么?在iOS8上引起Xamarin.Media.MediaPicker.TakePhotoAsync上的iPad2这个堆栈跟踪表明什么?由iOS8上的Xamarin.MediaPicker.TakePhotoAsync引起的崩溃

崩溃

我在记录错误... https://bugzilla.xamarin.com/show_bug.cgi?id=22853

,但我想,以确保它是不是我这样做。它在iOS7上运行良好。

OS Version:   iOS 8.0 (12A365) 
Report Version:  105 

Exception Type: EXC_BAD_ACCESS (SIGABRT) 
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000002c 
Triggered by Thread: 0 

Thread 0 name: Dispatch queue: com.apple.main-thread 
Thread 0 Crashed: 
0 libsystem_kernel.dylib   0x3ab05dfc __pthread_kill + 8 
1 libsystem_pthread.dylib   0x3ab85d0e pthread_kill + 58 
2 libsystem_c.dylib    0x3aaa5934 abort + 72 
3 TouchContainer     0x00bd5b3a mono_handle_native_sigsegv (mini-exceptions.c:2360) 
4 TouchContainer     0x00bdef72 mono_sigsegv_signal_handler (mini.c:6868) 
5 libsystem_platform.dylib  0x3ab800a0 _sigtramp + 40 
6 UIKit       0x30212304 _UIViewTopDownSubtreeTraversal + 260 
7 UIKit       0x30212304 _UIViewTopDownSubtreeTraversal + 260 
8 UIKit       0x305ab842 -[UIView(UIConstraintBasedLayout_EngineDelegate) _invalidateSystemLayoutSizeFittingSizeAtEngineDelegateLevel] + 118 
9 UIKit       0x300429c0 -[UIView(AdditionalLayoutSupport) _setNeedsUpdateConstraintsNeedingLayout:] + 68 
10 UIKit       0x305aa4e2 -[UIView(AdditionalLayoutSupport) _setSubviewWantsAutolayoutTripWantsAutolayout:] + 206 
11 UIKit       0x2ff88588 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1352 
12 UIKit       0x2ff88032 -[UIView(Hierarchy) addSubview:] + 26 
13 UIKit       0x3024b2a2 __56-[UIPresentationController _transplantView:toSuperview:]_block_invoke + 242 
14 UIKit       0x3024af8c -[UIPresentationController _performBlockWithoutTriggeringResponderEvents:] + 96 
15 UIKit       0x3024b1a6 -[UIPresentationController _transplantView:toSuperview:] + 78 
16 UIKit       0x3024e474 __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 768 
17 UIKit       0x3024d358 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 148 
18 UIKit       0x2fffb916 _applyBlockToCFArrayCopiedToStack + 306 
19 UIKit       0x2ff777da _afterCACommitHandler + 454 
20 CoreFoundation     0x2caca842 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18 
21 CoreFoundation     0x2cac7f24 __CFRunLoopDoObservers + 272 
22 CoreFoundation     0x2cac8326 __CFRunLoopRun + 910 
23 CoreFoundation     0x2ca15dac CFRunLoopRunSpecific + 472 
24 CoreFoundation     0x2ca15bbe CFRunLoopRunInMode + 102 
25 GraphicsServices    0x33d4904c GSEventRunModal + 132 
26 UIKit       0x2ffe0efc UIApplicationMain + 1436 
27 TouchContainer     0x001d81ec wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 268 
28 TouchContainer     0x0018533c MonoTouch_UIKit_UIApplication_Main_string___intptr_intptr (UIApplication.cs:122) 
29 TouchContainer     0x001852fc MonoTouch_UIKit_UIApplication_Main_string___string_string (UIApplication.cs:88) 
30 TouchContainer     0x000ad800 Touch_Container_Application_Main_string__ (MainClass.cs:84) 
31 TouchContainer     0x0036e9b4 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 196 
32 TouchContainer     0x00be115c mono_jit_runtime_invoke (mini.c:6730) 
33 TouchContainer     0x00c2059a mono_runtime_invoke (object.c:2831) 
34 TouchContainer     0x00c242a2 mono_runtime_exec_main (object.c:4088) 
35 TouchContainer     0x00c240ea mono_runtime_run_main (object.c:3714) 
36 TouchContainer     0x00bcea74 mono_jit_exec (driver.g.c:1009) 
37 TouchContainer     0x00c59894 monotouch_main (monotouch-main.m:469) 
38 TouchContainer     0x00bb0da0 main (main.armv7.m:65) 
39 TouchContainer     0x000a9024 start + 36 

回答

1

看来,我做错了从ActionSheet的Clicked事件调用TakePhotoAsync。当照片选择器呈现时,操作表仍然呈现。在iOS8之前,必须有防守代码才能在这种显然非法的情况下默默工作。解决方案是在BeginInvokeOnMainThread调用中运行TakePhotoAsync。这使主线程上的调用排队,并允许ActionSheet有一些空间来完成关闭。

相关问题