Hi,
I'm seeing a weird issue, where calling RemoveFromSuperview on a view is
crashing randomly. I don't seem to be getting an actual error message, but
the stack dump looks as follows:
at MonoTouch.UIKit.UIView.get_Superview () [0x0002b] in
/Developer/MonoTouch/Source/monotouch/src/UIKit/UIView.g.cs:1316
at MonoTouch.UIKit.UIView.RemoveFromSuperview () [0x00000] in
/Developer/MonoTouch/Source/monotouch/src/UIKit/UIView.g.cs:555
at Teraport.Controls.UIViewScroller.RemoveCell
(Teraport.Controls.UIViewScrollerCell,bool) [0x000e5] in
/Users/dj_technohead/Projects/Teraport/Monotouch/Teraport.Controls/UIViewScroller.xib.cs:321
at Teraport.Controls.UIViewScroller.ClearCells (bool) [0x0005a] in
/Users/dj_technohead/Projects/Teraport/Monotouch/Teraport.Controls/UIViewScroller.xib.cs:182
at Teraport.Controls.UIViewScroller.Clear () [0x0002d] in
/Users/dj_technohead/Projects/Teraport/Monotouch/Teraport.Controls/UIViewScroller.xib.cs:169
at Teraport.Controls.UIViewScrollerContainer.Clear () [0x00080] in
/Users/dj_technohead/Projects/Teraport/Monotouch/Teraport.Controls/UIViewScrollerContainer.xib.cs:154
at RNDVoo_iPhone.MatchesScreen.ViewWillDisappear (bool) [0x00050] in
/Users/dj_technohead/Projects/RndVoo/RndVooiPhoneApp/Screens/MatchesScreen.cs:138
at (wrapper runtime-invoke) object.runtime_invoke_dynamic
(intptr,intptr,intptr,intptr) <0xffffffff>
at MonoTouch.UIKit.UIView.RemoveFromSuperview () [0x00012] in
/Developer/MonoTouch/Source/monotouch/src/UIKit/UIView.g.cs:557
at RNDVoo_iPhone.MainViewController.SwitchView
(RNDVoo_iPhone.RndVooScreens,object) [0x0003c] in
/Users/dj_technohead/Projects/RndVoo/RndVooiPhoneApp/ViewControllers/MainViewController.cs:199
at
RNDVoo_iPhone.MainViewController/<handleTabbarhandleItemSelected>c__AnonStorey17.<>m__49
() [0x0006f] in
/Users/dj_technohead/Projects/RndVoo/RndVooiPhoneApp/ViewControllers/MainViewController.cs:178
at MonoTouch.Foundation.NSActionDispatcher.Apply () [0x00000] in
/Developer/MonoTouch/Source/monotouch/src/shared/Foundation/NSAction.cs:45
at (wrapper runtime-invoke) object.runtime_invoke_dynamic
(intptr,intptr,intptr,intptr) <0xffffffff>
at MonoTouch.Foundation.NSObject.InvokeOnMainThread
(MonoTouch.Foundation.NSAction) [0x00007] in
/Developer/MonoTouch/Source/monotouch/src/Foundation/NSObject.cs:286
at RNDVoo_iPhone.MainViewController.handleTabbarhandleItemSelected
(object,MonoTouch.UIKit.UITabBarItemEventArgs) [0x0001e] in
/Users/dj_technohead/Projects/RndVoo/RndVooiPhoneApp/ViewControllers/MainViewController.cs:160
at MonoTouch.UIKit.UITabBar/_UITabBarDelegate.ItemSelected
(MonoTouch.UIKit.UITabBar,MonoTouch.UIKit.UITabBarItem) [0x00012] in
/Developer/MonoTouch/Source/monotouch/src/UIKit/UITabBar.g.cs:389
at (wrapper runtime-invoke) object.runtime_invoke_dynamic
(intptr,intptr,intptr,intptr) <0xffffffff>
at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00042]
in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29
at RNDVoo_iPhone.Application.Main (string[]) [0x00000] in
/Users/dj_technohead/Projects/RndVoo/RndVooiPhoneApp/Main.cs:24
at (wrapper runtime-invoke) object.runtime_invoke_dynamic
(intptr,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
0 RNDVoo_iPhone 0x00ec1948
mono_handle_native_sigsegv + 280
1 RNDVoo_iPhone 0x00ea4a44
mono_sigsegv_signal_handler + 268
2 libsystem_c.dylib 0x35fb0539 _sigtramp + 48
3 RNDVoo_iPhone 0x0013be64
wrapper_managed_to_native_MonoTouch_ObjCRuntime_Messaging_IntPtr_objc_msgSendSuper_intptr_intptr
+ 68
4 RNDVoo_iPhone 0x0013be64
wrapper_managed_to_native_MonoTouch_ObjCRuntime_Messaging_IntPtr_objc_msgSendSuper_intptr_intptr
+ 68
5 RNDVoo_iPhone 0x00117170
MonoTouch_UIKit_UIView_RemoveFromSuperview + 36
6 RNDVoo_iPhone 0x001c5084
Teraport_Controls_UIViewScroller_RemoveCell_Teraport_Controls_UIViewScrollerCell_bool
+ 1496
7 RNDVoo_iPhone 0x001c2d54
Teraport_Controls_UIViewScroller_ClearCells_bool + 1024
8 RNDVoo_iPhone 0x001c2908
Teraport_Controls_UIViewScroller_Clear + 376
9 RNDVoo_iPhone 0x001c92fc
Teraport_Controls_UIViewScrollerContainer_Clear + 1244
10 RNDVoo_iPhone 0x0061d690
RNDVoo_iPhone_MatchesScreen_ViewWillDisappear_bool + 684
11 RNDVoo_iPhone 0x00c63474
wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
+ 200
12 RNDVoo_iPhone 0x00ea6d84
mono_jit_runtime_invoke
+ 1644
13 RNDVoo_iPhone 0x00f5f648 mono_runtime_invoke +
128
14 RNDVoo_iPhone 0x00fce854 monotouch_trampoline
+
3156
15 UIKit 0x34f396b5 -[UIViewController
_setViewAppearState:isAnimating:] + 144
16 UIKit 0x34f3957b -[UIViewController
viewWillMoveToWindow:] + 210
17 UIKit 0x34ef8ed5 -[UIView(Hierarchy)
_willMoveToWindow:] + 444
18 UIKit 0x350b73ef
__UIViewWillBeRemovedFromSuperview + 274
19 UIKit 0x34ef8ad1 -[UIView(Hierarchy)
removeFromSuperview] + 56
20 RNDVoo_iPhone 0x0013b69c
wrapper_managed_to_native_MonoTouch_ObjCRuntime_Messaging_void_objc_msgSend_intptr_intptr
+ 68
21 RNDVoo_iPhone 0x0061a978
RNDVoo_iPhone_MainViewController_SwitchView_RNDVoo_iPhone_RndVooScreens_object
+ 620
22 RNDVoo_iPhone 0x006887b0
RNDVoo_iPhone_MainViewController__handleTabbarhandleItemSelectedc__AnonStorey17__m__49
+ 776
23 RNDVoo_iPhone 0x000ea6f0
MonoTouch_Foundation_NSActionDispatcher_Apply + 44
24 RNDVoo_iPhone 0x00c63474
wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
+ 200
25 RNDVoo_iPhone 0x00ea6d84
mono_jit_runtime_invoke
+ 1644
26 RNDVoo_iPhone 0x00f5f648 mono_runtime_invoke +
128
27 RNDVoo_iPhone 0x00fce854 monotouch_trampoline
+
3156
28 Foundation 0x319d91b7
-[NSObject(NSThreadPerformAdditions)
performSelector:onThread:withObject:waitUntilDone:modes:] + 266
29 Foundation 0x319d8e49
-[NSObject(NSThreadPerformAdditions)
performSelectorOnMainThread:withObject:waitUntilDone:] + 136
30 RNDVoo_iPhone 0x0013b874
wrapper_managed_to_native_MonoTouch_ObjCRuntime_Messaging_void_objc_msgSend_intptr_intptr_bool_intptr_intptr_intptr_intptr_bool
+ 120
31 RNDVoo_iPhone 0x0061a68c
RNDVoo_iPhone_MainViewController_handleTabbarhandleItemSelected_object_MonoTouch_UIKit_UITabBarItemEventArgs
+ 444
32 RNDVoo_iPhone 0x00110984
MonoTouch_UIKit_UITabBar__UITabBarDelegate_ItemSelected_MonoTouch_UIKit_UITabBar_MonoTouch_UIKit_UITabBarItem
+ 108
33 RNDVoo_iPhone 0x00c63474
wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
+ 200
34 RNDVoo_iPhone 0x00ea6d84
mono_jit_runtime_invoke
+ 1644
35 RNDVoo_iPhone 0x00f5f648 mono_runtime_invoke +
128
36 RNDVoo_iPhone 0x00fce854 monotouch_trampoline
+
3156
37 UIKit 0x3501892b -[UITabBar
_sendAction:withEvent:] + 242
38 CoreFoundation 0x37a99435 -[NSObject
performSelector:withObject:withObject:] + 52
39 UIKit 0x34f129eb -[UIApplication
sendAction:to:from:forEvent:] + 62
40 UIKit 0x34f129a7 -[UIApplication
sendAction:toTarget:fromSender:forEvent:] + 30
41 UIKit 0x34f12985 -[UIControl
sendAction:to:forEvent:] + 44
42 UIKit 0x34f126f5 -[UIControl(Internal)
_sendActionsForEvents:withEvent:] + 492
43 Foundation 0x31a70943
__NSFireDelayedPerform
+ 414
44 CoreFoundation 0x37b13a63
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
45 CoreFoundation 0x37b136c9 __CFRunLoopDoTimer +
364
46 CoreFoundation 0x37b1229f __CFRunLoopRun + 1206
47 CoreFoundation 0x37a954dd CFRunLoopRunSpecific
+
300
48 CoreFoundation 0x37a953a5 CFRunLoopRunInMode +
104
49 GraphicsServices 0x37613fcd GSEventRunModal + 156
50 UIKit 0x34f25743 UIApplicationMain +
1090
51 RNDVoo_iPhone 0x00143114
wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr
+ 240
52 RNDVoo_iPhone 0x005e0658
RNDVoo_iPhone_Application_Main_string__ + 160
53 RNDVoo_iPhone 0x00c63474
wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
+ 200
54 RNDVoo_iPhone 0x00ea6d84
mono_jit_runtime_invoke
+ 1644
55 RNDVoo_iPhone 0x00f5f648 mono_runtime_invoke +
128
56 RNDVoo_iPhone 0x00f639e0
mono_runtime_exec_main
+ 436
57 RNDVoo_iPhone 0x00f68f48
mono_runtime_run_main +
756
58 RNDVoo_iPhone 0x00eadb7c mono_jit_exec + 140
59 RNDVoo_iPhone 0x00ea1fc0 main + 2324
60 RNDVoo_iPhone 0x0000c108 start + 40
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Any ideas as to what's going on? I've tried wrapping the offending line
in a try/catch to handle it, but that doesn't work.
thanks,
Dennis
--
View this message in context:
http://monotouch.2284126.n4.nabble.com/RemoveFromSuperview-crashing-tp4384611p4384611.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch