Okay guys, I'm baffled - and I can't figure out what's going on with the app I'm writing.
At launch the app opens as expected, pages load and close with no issues, but I have one page that can only be opened once, and if you navigate away and try to go back it crashes with the error below.
Background:
The app is built with Xamarin.Forms Shell, and all navigation requests use: await Current.Shell.GoToAsync("pagename", true);
I'm thinking it has something to do with either the Entry or DatePicker based on what I think the StackTrace is showing me, but I'm not sure what's going on because it only happens on the 2nd time I try to navigate to the page - even if I navigate to a dozen other pages in between the 1st and 2nd time to this page. Any thoughts on how I can debug this any further without trying to rebuild the entire page?
ERROR:
System.ArgumentNullException has been thrown
Value cannot be null.
Parameter name: value
STACK TRACE:
at MaterialComponents.TextInputControllerBase.set_InlinePlaceholderColor (UIKit.UIColor value) [0x00003] in <5ea3f71d824c4ee79e20a123731c7acf>:0
at Xamarin.Forms.Material.iOS.MaterialTextManager.ApplyTheme (Xamarin.Forms.Material.iOS.IMaterialTextField textField, Xamarin.Forms.Material.iOS.IMaterialEntryRenderer element) [0x00059] in \a\1\s\Xamarin.Forms.Material.iOS\MaterialTextManager.cs:51
at Xamarin.Forms.Material.iOS.MaterialTextManager.Init (Xamarin.Forms.Material.iOS.IMaterialEntryRenderer element, Xamarin.Forms.Material.iOS.IMaterialTextField textField, Xamarin.Forms.Internals.IFontElement fontElement) [0x0004d] in \a\1\s\Xamarin.Forms.Material.iOS\MaterialTextManager.cs:26
at Xamarin.Forms.Material.iOS.MaterialTextField..ctor (Xamarin.Forms.Material.iOS.IMaterialEntryRenderer element, Xamarin.Forms.Internals.IFontElement fontElement) [0x00006] in \a\1\s\Xamarin.Forms.Material.iOS\MaterialTextField.cs:18
at Xamarin.Forms.Material.iOS.MaterialEntryRenderer.CreateNativeControl () [0x00000] in \a\1\s\Xamarin.Forms.Material.iOS\MaterialEntryRenderer.cs:10
at Xamarin.Forms.Platform.iOS.EntryRendererBase1[TControl].OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs
1[TElement] e) [0x00020] in \a\1\s\Xamarin.Forms.Platform.iOS\Renderers\EntryRenderer.cs:107
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x00122] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:277 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:144
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in \a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:188
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:99
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:48
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000de] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:264 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:144
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in \a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:188
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:99
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:48
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000de] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:264 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:144
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in \a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:188
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:99
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:48
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000de] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:264 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:144
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in \a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:188
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:99
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:48
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000de] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:264 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:144
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in \a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:188
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:99
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:48
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000de] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:264 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:144
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in \a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:188
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:99
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:48
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000de] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:264 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:144
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in \a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:188
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:99
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:48
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000de] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:264 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:144
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in \a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:188
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:99
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:48
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000de] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:264 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:144
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in \a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:188
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:99
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:48
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000de] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:264 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:144
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in \a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:188
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:99
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:48
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000de] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:264 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:144
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in \a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:188
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:99
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in \a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:48
at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x0008f] in \a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:238
at (wrapper managed-to-native) ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper(intptr,intptr)
at UIKit.UIViewController.get_View () [0x0002a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.4.0.2/src/Xamarin.iOS/UIViewController.g.cs:3171
at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:104
at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0003d] in \a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:120
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in \a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:188
at Xamarin.Forms.Platform.iOS.ShellSectionRenderer.PushPage (Xamarin.Forms.Page page, System.Boolean animated, System.Threading.Tasks.TaskCompletionSource1[TResult] completionSource) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\ShellSectionRenderer.cs:379 at Xamarin.Forms.Platform.iOS.ShellSectionRenderer.OnPushRequested (Xamarin.Forms.Internals.NavigationRequestedEventArgs e) [0x00014] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\ShellSectionRenderer.cs:298 at Xamarin.Forms.Platform.iOS.ShellSectionRenderer.OnNavigationRequested (System.Object sender, Xamarin.Forms.Internals.NavigationRequestedEventArgs e) [0x00024] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\ShellSectionRenderer.cs:234 at Xamarin.Forms.ShellSection.OnPushAsync (Xamarin.Forms.Page page, System.Boolean animated) [0x00065] in D:\a\1\s\Xamarin.Forms.Core\Shell\ShellSection.cs:491 at Xamarin.Forms.ShellSection.GoToAsync (Xamarin.Forms.NavigationRequest request, System.Collections.Generic.IDictionary
2[TKey,TValue] queryData, System.Boolean animate) [0x00200] in \a\1\s\Xamarin.Forms.Core\Shell\ShellSection.cs:285
at Xamarin.Forms.Shell.GoToAsync (Xamarin.Forms.ShellNavigationState state, System.Boolean animate, System.Boolean enableRelativeShellRoutes) [0x001df] in \a\1\s\Xamarin.Forms.Core\Shell\Shell.cs:444
at HthApp.Api.HthApi.ItemSearchOpenAsync () [0x0002a] in /Users/matthew.bailey/Projects/hthapp/HthApp/Api/HthApi.cs:1519
at HthApp.Api.HthApi+<>c.b__53_3 () [0x00019] in /Users/matthew.bailey/Projects/hthapp/HthApp/Api/HthApi.cs:330
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021
at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.4.0.2/src/Xamarin.iOS/Foundation/NSAction.cs:178