question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NRE on real device

See original GitHub issue

Hello, i am developing an fabulous app and currently experiencing weird issue while running my app on real device (Xiaomi mi8 if that does matter anything). I have a view, which has two “states”: first is just a label with “no content” text and second is a ListView. On first load i am getting the error below. On next view loads all works fine. I am guessing this could be tied to fact that i have two different kind of visual tree in each state and when Fabulous trying to calculate the diff for ObservableCollection, it simpy cannot find the previous one. But anyway, any help and clues of what is going on is greatly appreciated

Unable to update view:: System.NullReferenceException: Object reference not set to an instance of an object. at Xamarin.Forms.Platform.Android.PageRenderer.Xamarin.Forms.Platform.Android.IOrderedTraversalController.UpdateTraversalOrder () [0x000a4] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\PageRenderer.cs:177 at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].UpdateParentPageTraversalOrder () [0x00025] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:404 at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00116] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:369 at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs) at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core
BindableObject.cs:211 at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:353 at Xamarin.Forms.Element.set_Parent (Xamarin.Forms.Element value) [0x00094] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:210 at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:335 at Xamarin.Forms.VisualElement.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:750 at Xamarin.Forms.Layout1[T].OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:41 at Xamarin.Forms.Layout.OnInternalRemoved (Xamarin.Forms.View view) [0x00012] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:464 at Xamarin.Forms.Layout.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0002b] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:427 at (wrap per delegate-invoke) <Module>.invoke_void_object_NotifyCollectionChangedEventArgs(object,System.Collections.Specialized.NotifyCollectionChangedEventArgs) at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00018] in /Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:263 at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object oldItem, System.Object newItem, System.Int32 index) [0x00000] in /Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:354 at System.Collections.ObjectModel.ObservableCollection1[T].SetItem (System.Int32 index, T item) [ 0x0001c] in /Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:210 at System.Collections.ObjectModel.Collection1[T].set_Item (System.Int32 index, T value) [0x0002b] in /Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/external/corefx/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs:61 at Xamarin.Forms.ObservableWrapper2[TTrack,TRestrict].set_Item (System.Int32 index, TRestrict value) [0x00029] in D:\a\1\s\Xamarin.Forms.Core\ObservableWrapper.cs:140 at Fabulous.DynamicViews.Converters.updateCollectionGeneric$cont@387[T,TargetT] (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, System.Collections.Generic.IList1[T] targetColl, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] create, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] canReuse, Microsoft.FSharp.Core .FSharpFunc2[T,TResult] update, T[] coll, Microsoft.FSharp.Core.Unit unitVar) [0x000ec] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:407 at Fabulous.DynamicViews.Converters.updateCollectionGeneric[T,TargetT] (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, Microsoft.FSharp.Core.FSharpValueOption1[T] collOpt, System.Collections.Generic.IList1[T] targetColl, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] create, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] canReuse, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] update) [0x00060] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:383 at Fabulous.DynamicViews.ViewBuilders.UpdateGrid (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.Grid target) [0x00465] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:5320 at <StartupCode$Fabulous-Core>.$Xamarin.Forms.Core+get_UpdateFuncGrid@5258.Invoke (Mic rosoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.Grid target) [0x00000] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:5258 at Fabulous.DynamicViews.Converters.updateCollectionGeneric$cont@387[T,TargetT] (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, System.Collections.Generic.IList1[T] targetColl, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] create, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] canReuse, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] update, T[] coll, Microsoft.FSharp.Core.Unit unitVar) [0x0010e] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:411 at Fabulous.DynamicViews.Converters.updateCollectionGeneric[T,TargetT] (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, Microsoft.FSharp.Core.FSharpValueOption1[T] collOpt, System.Collections.Generic.IList1[T] targetColl, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] create, Micros oft.FSharp.Core.FSharpFunc2[T,TResult] attach, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] canReuse, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] update) [0x00060] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:383 at Fabulous.DynamicViews.ViewBuilders.UpdateGrid (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.Grid target) [0x00465] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:5320 at <StartupCode$Fabulous-Core>.$Xamarin.Forms.Core+get_UpdateFuncGrid@5258.Invoke (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.Grid target) [0x00000] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:5258 at Fabulous.DynamicViews.ViewBuilders.UpdateContentView (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.ContentView target) [0x001c6] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms .Core.fs:6565 at <StartupCode$Fabulous-Core>.$Xamarin.Forms.Core+get_UpdateFuncContentView@6543.Invoke (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.ContentView target) [0x00000] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:6543 at Fabulous.DynamicViews.Converters.updateCollectionGeneric$cont@387[T,TargetT] (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, System.Collections.Generic.IList1[T] targetColl, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] create, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] canReuse, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] update, T[] coll, Microsoft.FSharp.Core.Unit unitVar) [0x0010e] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:411 at Fabulous.DynamicViews.Converters.updateCollectionGeneric[T,TargetT] (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, Microsoft.FSharp.Core.FSharpValueOption1[T] co llOpt, System.Collections.Generic.IList1[T] targetColl, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] create, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] canReuse, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] update) [0x00060] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:383 at Fabulous.DynamicViews.ViewBuilders.UpdateGrid (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.Grid target) [0x00465] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:5320 at <StartupCode$Fabulous-Core>.$Xamarin.Forms.Core+get_UpdateFuncGrid@5258.Invoke (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.Grid target) [0x00000] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:5258 at Fabulous.DynamicViews.ViewBuilders.UpdateContentPage (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews. ViewElement curr, Xamarin.Forms.ContentPage target) [0x00239] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:12613 at <StartupCode$Fabulous-Core>.$Xamarin.Forms.Core+get_UpdateFuncContentPage@12585.Invoke (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.ContentPage target) [0x00000] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:12585 at Fabulous.DynamicViews.Converters.updateNavigationPages (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, Microsoft.FSharp.Core.FSharpValueOption1[T] collOpt, Xamarin.Forms.NavigationPage target, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach) [0x00274] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:694 at Fabulous.DynamicViews.ViewBuilders.UpdateNavigationPage (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.NavigationPage target) [0x00339] in /Git/Github/Fabulous/src/Fabulous.Core/Xamar in.Forms.Core.fs:11975 at <StartupCode$Fabulous-Core>.$Xamarin.Forms.Core+get_UpdateFuncNavigationPage@11927.Invoke (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.NavigationPage target) [0x00000] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:11927 at Fabulous.Core.ProgramRunner2[model,msg].updateView (model updatedModel) [0x00067] in /Git/Github/Fabulous/src/Fabulous.Core/ElmishProgram.fs:92 at Fabulous.Core.ProgramRunner2[model,msg].processMsg (msg msg) [0x0002e] in /Git/Github/Fabulous/src/Fabulous.Core/ElmishProgram.fs:68 07-12 16:56:22.842 I/mono-stdout(31427): Unable to update view:: System.NullReferenceException: Object reference not set to an instance of an object. 07-12 16:56:22.842 I/mono-stdout(31427): at Xamarin.Forms.Platform.Android.PageRenderer.Xamarin.Forms.Platform.Android.IOrderedTraversalController.UpdateTraversalOrder () [0x000a4] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\PageRenderer.cs:177 07-12 16:56:22.842 I/mono-stdout(31427): at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].UpdateParentPageTraversalOrder () [0x00025] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:404 07-12 16:56:22.842 I/mono-stdout(31427): at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00116] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:369 07-12 16:56:22.842 I/mono-stdout(31427): at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs) 07-12 16:56:22.842 I/mono-stdout(31427): at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:211 07-12 16:56:22.842 I/mono-stdout(31427): at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:353 07-12 16:56:22.842 I/mono-stdout(31427): at Xamarin.Forms.Element.set_Parent (Xamarin.Forms.Element value) [0x00094] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:210 07-12 16:56:22.842 I/mono-stdout(31427): at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:335 07-12 16:56:22.842 I/mono-stdout(31427): at Xamarin.Forms.VisualElement.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:750 07-12 16:56:22.842 I/mono-stdout(31427): at Xamarin.Forms.Layout1[T].OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:41 07-12 16:56:22.842 I/mono-stdout(31427): at Xamarin.Forms.Layout.OnInternalRemoved (Xamarin.Forms.View view) [0x00012] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:464 07-12 16:56:22.842 I/mono-stdout(31427): at Xamarin.Forms.Layout.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0002b] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:427 07-12 16:56:22.842 I/mono-stdout(31427): at (wrapper delegate-invoke) <Module>.invoke_void_object_NotifyCollectionChangedEventArgs(object,System.Collections.Specialized.NotifyCollectionChangedEventArgs) 07-12 16:56:22.842 I/mono-stdout(31427): at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00018] in /Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:263 07-12 16:56:22.842 I/mono-stdout(31427): at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object oldItem, System.Object newItem, System.Int32 index) [0x00000] in /Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:354 07-12 16:56:22.842 I/mono-stdout(31427): at System.Collections.ObjectModel.ObservableCollection1[T].SetItem (System.Int32 index, T item) [0x0001c] in /Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:210 07-12 16:56:22.842 I/mono-stdout(31427): at System.Collections.ObjectModel.Collection1[T].set_Item (System.Int32 index, T value) [0x0002b] in /Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/external/corefx/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs:61 07-12 16:56:22.842 I/mono-stdout(31427): at Xamarin.Forms.ObservableWrapper2[TTrack,TRestrict].set_Item (System.Int32 index, TRestrict value) [0x00029] in D:\a\1\s\Xamarin.Forms.Core\ObservableWrapper.cs:140 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.Converters.updateCollectionGeneric$cont@387[T,TargetT] (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, System.Collections.Generic.IList1[T] targetColl, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] create, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] canReuse, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] update, T[] coll, Microsoft.FSharp.Core.Unit unitVar) [0x000ec] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:407 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.Converters.updateCollectionGeneric[T,TargetT] (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, Microsoft.FSharp.Core.FSharpValueOption1[T] collOpt, System.Collections.Generic.IList1[T] targetColl, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] create, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] canReuse, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] update) [0x00060] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:383 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.ViewBuilders.UpdateGrid (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.Grid target) [0x00465] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:5320 07-12 16:56:22.843 I/mono-stdout(31427): at <StartupCode$Fabulous-Core>.$Xamarin.Forms.Core+get_UpdateFuncGrid@5258.Invoke (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.Grid target) [0x00000] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:5258 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.Converters.updateCollectionGeneric$cont@387[T,TargetT] (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, System.Collections.Generic.IList1[T] targetColl, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] create, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] canReuse, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] update, T[] coll, Microsoft.FSharp.Core.Unit unitVar) [0x0010e] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:411 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.Converters.updateCollectionGeneric[T,TargetT] (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, Microsoft.FSharp.Core.FSharpValueOption1[T] collOpt, System.Collections.Generic.IList1[T] targetColl, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] create, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] canReuse, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] update) [0x00060] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:383 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.ViewBuilders.UpdateGrid (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.Grid target) [0x00465] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:5320 07-12 16:56:22.843 I/mono-stdout(31427): at <StartupCode$Fabulous-Core>.$Xamarin.Forms.Core+get_UpdateFuncGrid@5258.Invoke (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.Grid target) [0x00000] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:5258 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.ViewBuilders.UpdateContentView (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.ContentView target) [0x001c6] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:6565 07-12 16:56:22.843 I/mono-stdout(31427): at <StartupCode$Fabulous-Core>.$Xamarin.Forms.Core+get_UpdateFuncContentView@6543.Invoke (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.ContentView target) [0x00000] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:6543 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.Converters.updateCollectionGeneric$cont@387[T,TargetT] (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, System.Collections.Generic.IList1[T] targetColl, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] create, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] canReuse, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] update, T[] coll, Microsoft.FSharp.Core.Unit unitVar) [0x0010e] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:411 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.Converters.updateCollectionGeneric[T,TargetT] (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, Microsoft.FSharp.Core.FSharpValueOption1[T] collOpt, System.Collections.Generic.IList1[T] targetColl, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] create, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] canReuse, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] update) [0x00060] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:383 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.ViewBuilders.UpdateGrid (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.Grid target) [0x00465] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:5320 07-12 16:56:22.843 I/mono-stdout(31427): at <StartupCode$Fabulous-Core>.$Xamarin.Forms.Core+get_UpdateFuncGrid@5258.Invoke (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.Grid target) [0x00000] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:5258 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.ViewBuilders.UpdateContentPage (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.ContentPage target) [0x00239] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:12613 07-12 16:56:22.843 I/mono-stdout(31427): at <StartupCode$Fabulous-Core>.$Xamarin.Forms.Core+get_UpdateFuncContentPage@12585.Invoke (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.ContentPage target) [0x00000] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:12585 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.Converters.updateNavigationPages (Microsoft.FSharp.Core.FSharpValueOption1[T] prevCollOpt, Microsoft.FSharp.Core.FSharpValueOption1[T] collOpt, Xamarin.Forms.NavigationPage target, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] attach) [0x00274] in /Git/Github/Fabulous/src/Fabulous.Core/ViewConverters.fs:694 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.DynamicViews.ViewBuilders.UpdateNavigationPage (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.NavigationPage target) [0x00339] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:11975 07-12 16:56:22.843 I/mono-stdout(31427): at <StartupCode$Fabulous-Core>.$Xamarin.Forms.Core+get_UpdateFuncNavigationPage@11927.Invoke (Microsoft.FSharp.Core.FSharpValueOption1[T] prevOpt, Fabulous.DynamicViews.ViewElement curr, Xamarin.Forms.NavigationPage target) [0x00000] in /Git/Github/Fabulous/src/Fabulous.Core/Xamarin.Forms.Core.fs:11927 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.Core.ProgramRunner2[model,msg].updateView (model updatedModel) [0x00067] in /Git/Github/Fabulous/src/Fabulous.Core/ElmishProgram.fs:92 07-12 16:56:22.843 I/mono-stdout(31427): at Fabulous.Core.ProgramRunner2[model,msg].processMsg (msg msg) [0x0002e] in /Git/Github/Fabulous/src/Fabulous.Core/ElmishProgram.fs:68

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:62 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
SergejDKcommented, Jul 19, 2019

@vshapenko Your example created the error from #492 which @Happypig375 discovered on antoher device (Motorola G6) maybe your issue and the one from @Happypig375 are related.

Will try to identify what is happenend here that makes this stuff go crazy.

3reactions
vshapenkocommented, Jul 18, 2019
namespace ReproApp

open System.Diagnostics
open Fabulous
open Fabulous.XamarinForms
open Xamarin.Forms

module App = 
    type Model = 
      { Flag:bool }

    type Msg =
        |Flag


    let initModel = {Flag=true }

    let init () = initModel, Cmd.none



    let update msg model =
        match msg with
        |Flag->{model with Flag=not model.Flag},Cmd.none

    let view (model: Model) dispatch =
        View.ContentPage(
           content=View.Grid(
               rowdefs=["auto";"*"],
               children =
                   [
                     yield View.Button (text="SetFlag", command= (fun ()->dispatch Flag))
                     if(model.Flag) then yield (View.Label(text="Flag set")).GridRow(1)
                     else yield View.ListView(items=([1..100]|>List.map (fun x->View.Label(text=string x)))).GridRow(1)
                     
                     
                   ]
                   )
           )

    // Note, this declaration is needed if you enable LiveUpdate
    let program = Program.mkProgram init update view

type App () as app = 
    inherit Application ()

    let runner = 
        App.program
#if DEBUG
        |> Program.withConsoleTrace
#endif
        |> XamarinFormsProgram.run app

#if DEBUG
    // Uncomment this line to enable live update in debug mode. 
    // See https://fsprojects.github.io/Fabulous/tools.html for further  instructions.
    //
    //do runner.EnableLiveUpdate()
#endif    

    // Uncomment this code to save the application state to app.Properties using Newtonsoft.Json
    // See https://fsprojects.github.io/Fabulous/models.html for further  instructions.
#if APPSAVE
    let modelId = "model"
    override __.OnSleep() = 

        let json = Newtonsoft.Json.JsonConvert.SerializeObject(runner.CurrentModel)
        Console.WriteLine("OnSleep: saving model into app.Properties, json = {0}", json)

        app.Properties.[modelId] <- json

    override __.OnResume() = 
        Console.WriteLine "OnResume: checking for model in app.Properties"
        try 
            match app.Properties.TryGetValue modelId with
            | true, (:? string as json) -> 

                Console.WriteLine("OnResume: restoring model from app.Properties, json = {0}", json)
                let model = Newtonsoft.Json.JsonConvert.DeserializeObject<App.Model>(json)

                Console.WriteLine("OnResume: restoring model from app.Properties, model = {0}", (sprintf "%0A" model))
                runner.SetCurrentModel (model, Cmd.none)

            | _ -> ()
        with ex -> 
            App.program.onError("Error while restoring model found in app.Properties", ex)

    override this.OnStart() = 
        Console.WriteLine "OnStart: using same logic as OnResume()"
        this.OnResume()
#endif


@TimLariviere here is small repro. On my Xialomi Mi 8 throws NRE on second button click

Read more comments on GitHub >

github_iconTop Results From Across the Web

NRE | Titoma
NRE Meaning = Non Recurring Engineering Costs; these are what you get charged to have your customized electronic product ready for mass manufacturing....
Read more >
Testing a react native app on android real device
Is there a way to test a react native app on android device instead of using an emulator? For the configuration, I tried...
Read more >
Run React Native App on Real Device - YouTube
Hello Friends In this tutorial video, We will learn how to run React Native App on the real device.The following steps are used...
Read more >
NRE (Menu 30) - Genshin Impact Wiki - Fandom
According to this gadget's diagram description, NRE stands for "Nutrition, Ready-to-eat". The name of the gadget is a reference to the MRE (Meal,...
Read more >
Definition of NRE
What is NRE? Definition. Nonrecurring engineering — one-time engineering costs associated with a project. Find a term alphabetically:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found