Hi,
I am getting a crash (details at the end of this post) in an app I'm writing, and it appears the crash is inside forms engine. My setup is relatively complicated, and I sort of assume I'm doing something naughty, but am not sure exactly what. Here's the basics of my app;
NavigationPage
CarouselPage
ContentPage
ContentPage
In the activate of the first content page the app checks if the user is logged in/needs to re-auth etc. and if so navigations (pushasync) to a new content page. That all works fine... however when I go back from that login content page (popasync,), the null reference exception occurs just after the previous pages redisplay.
This only happens on iOS, Windows Phone works perfectly (I can't try Android at the moment - no license). I realise there are other ways of handling the login process, but this is the flow I wanted and I expected it to either work on all platforms or none.
Anybody got any idea about what I might be doing to cause this? Is there somewhere I should report this as a bug?
Thanks.
Troy
Crash details;
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at Xamarin.Forms.Platform.iOS.NavigationRenderer+ParentingViewController.ViewDidLayoutSubviews () [0x00000] in :0
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:62
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:46
at OntempoStore.Companion.iOS.Application.Main (System.String[] args) [0x00001] in c:\temp\OntempoStore.Companion\OntempoStore.Companion\OntempoStore.Companion.iOS\Main.cs:17
2014-09-26 08:53:51.348 OntempoStoreCompanion[482:7515] Unhandled managed exception: Object reference not set to an instance of an object (System.NullReferenceException)
at Xamarin.Forms.Platform.iOS.NavigationRenderer+ParentingViewController.ViewDidLayoutSubviews () [0x00000] in :0
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:62
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:46
at OntempoStore.Companion.iOS.Application.Main (System.String[] args) [0x00001] in c:\temp\OntempoStore.Companion\OntempoStore.Companion\OntempoStore.Companion.iOS\Main.cs:17
mono-rt: Stacktrace:
mono-rt:
Native
stacktrace:
mono-rt: 0 OntempoStoreCompanion 0x000e0a87 mono_handle_native_sigsegv + 311
mono-rt: 1 OntempoStoreCompanion 0x000ecdda sigabrt_signal_handler + 122
mono-rt: 2 libsystem_platform.dylib 0x0721cdeb _sigtramp + 43
mono-rt: 3 ??? 0xffffffff 0x0 + 4294967295
mono-rt: 4 libsystem_sim_c.dylib 0x06f9ca5a abort + 156
mono-rt: 5 OntempoStoreCompanion 0x002a1783 monotouch_unhandled_exception_handler + 291
mono-rt: 6 OntempoStoreCompanion 0x000e12fb mono_invoke_unhandled_exception_hook + 91
mono-rt: 7 OntempoStoreCompanion 0x000e02ed mono_handle_exception_internal + 6685
mono-rt: 8 OntempoStoreCompanion 0x000de8c9 mono_handle_exception + 41
mono-rt: 9 OntempoStoreCompanion 0x000786c0 altstack_handle_and_restore + 80
mono-rt: 10 ??? 0x17d5346a 0x0 + 399848554
mono-rt: 11 ???
0x143ef411 0x0 + 339670033
mono-rt: 12 OntempoStoreCompanion 0x00114bc5 mono_jit_runtime_invoke + 725
mono-rt: 13 OntempoStoreCompanion 0x001b5f2f mono_runtime_invoke + 127
mono-rt: 14 OntempoStoreCompanion 0x0029843f monotouch_trampoline + 4991
mono-rt: 15 UIKit 0x030f6a0a -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 682
mono-rt: 16 libobjc.A.dylib 0x06bca771 -[NSObject performSelector:withObject:] + 70
mono-rt: 17 QuartzCore 0x08eb127f -[CALayer layoutSublayers] + 152
mono-rt: 18 QuartzCore 0x08ea5105 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397
mono-rt: 19 QuartzCore 0x08ea4f60 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
mono-rt: 20 QuartzCore 0x08e03676 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
mono-rt: 21 QuartzCo
re 0x08e04a3c _ZN2CA11Transaction6commitEv + 392
mono-rt: 22 QuartzCore 0x08e05108 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
mono-rt: 23 CoreFoundation 0x00673fbe CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 30
mono-rt: 24 CoreFoundation 0x00673f00 __CFRunLoopDoObservers + 400
mono-rt: 25 CoreFoundation 0x0066993a __CFRunLoopRun + 1226
mono-rt: 26 CoreFoundation 0x006691ab CFRunLoopRunSpecific + 443
mono-rt: 27 CoreFoundation 0x00668fdb CFRunLoopRunInMode + 123
mono-rt: 28 GraphicsServices 0x0909024f GSEventRunModal + 192
mono-rt: 29 GraphicsServices 0x0909008c GSEventRun + 104
mono-rt: 30 UIKit 0x0306be16 UIApplicationMain + 1526
mono-rt: 31 ??? 0x1679f9f0 0x0 + 377092592
mono-rt:
32 ??? 0x1679f800 0x0 + 377092096
mono-rt: 33 ??? 0x1679db78 0x0 + 377084792
mono-rt: 34 ??? 0x1679d8f0 0x0 + 377084144
mono-rt: 35 ??? 0x1679da4f 0x0 + 377084495
mono-rt: 36 OntempoStoreCompanion 0x00114bc5 mono_jit_runtime_invoke + 725
mono-rt: 37 OntempoStoreCompanion 0x001b5f2f mono_runtime_invoke + 127
mono-rt: 38 OntempoStoreCompanion 0x001bbb01 mono_runtime_exec_main + 401
mono-rt: 39 OntempoStoreCompanion 0x001bb8aa mono_runtime_run_main + 682
mono-rt: 40 OntempoStoreCompanion 0x0006f38d mono_jit_exec + 93
mono-rt: 41 OntempoStoreCompanion 0x00289395 monotouch_main + 2741
mono-rt: 42 OntempoStoreCompanion 0x002a2035 main + 117
mono-rt: 43 libdyld.dylib 0x06ef2ac9 start + 1
mono-rt:
=========================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries