Welcome to the Xamarin.Forms feedback portal. We’re happy you’re here! If you have feedback on how to improve the Xamarin.Forms, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
I have a Listview with a component which has a bageview.
when navigating away and navigating back to the tab then the view with the badge on the stack gets automatically removed and then the exception is thrown.
11-15 11:18:38.014 I/MonoDroid(14858): UNHANDLED EXCEPTION:
11-15 11:18:38.018 I/MonoDroid(14858): System.NullReferenceException: Object reference not set to an instance of an object.
11-15 11:18:38.018 I/MonoDroid(14858): at Syncfusion.XForms.Android.BadgeView.SfBadgeView.CalculateBadgeSize () [0x00027] in <13c48b91b48840b5b797a383ff912481>:0
11-15 11:18:38.018 I/MonoDroid(14858): at Syncfusion.XForms.Android.BadgeView.BadgeDependencyService.Syncfusion.XForms.BadgeView.IBadgeDependencyService.SetBadgeSize (System.Object nativeView, Syncfusion.XForms.BadgeView.SfBadgeView badgeView) [0x0000a] in <13c48b91b48840b5b797a383ff912481>:0
11-15 11:18:38.018 I/MonoDroid(14858): at Syncfusion.XForms.BadgeView.SfBadgeView.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x0001c] in <74b483f557214b0c9fe615085ba41daf>:0
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:644
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:132
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:702
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) [0x000a8] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:163
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) [0x00058] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:123
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:80
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:762
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:644
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:132
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:702
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.TemplatedView.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0003c] in D:\a\1\s\Xamarin.Forms.Core\TemplatedView.cs:43
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:762
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:644
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:132
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:702
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.TemplatedView.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0003c] in D:\a\1\s\Xamarin.Forms.Core\TemplatedView.cs:43
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:762
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:644
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:132
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:702
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) [0x000a8] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:163
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) [0x00058] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:123
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:80
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:762
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:644
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:132
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:702
11-15 11:18:38.018 I/MonoDroid(14858): at Syncfusion.ListView.XForms.Android.MeasureSize.CalculateSize (Syncfusion.ListView.XForms.SfListView listview, Xamarin.Forms.View content, Xamarin.Forms.Size viewSize, System.Boolean isMeasureInvalidated) [0x0001b] in
11-15 11:18:38.018 I/MonoDroid(14858): at Syncfusion.ListView.XForms.LayoutBase.GetAutoFitItemSize (Syncfusion.ListView.XForms.ListViewItemInfoBase itemInfo, System.Double& itemSize, System.Double itemSpacing, System.Int32 spanCount) [0x0010c] in
11-15 11:18:38.018 I/MonoDroid(14858): at Syncfusion.ListView.XForms.GridLayout.GetAutoFitItemSize (Syncfusion.ListView.XForms.ListViewItemInfoBase itemInfo, System.Double& itemSize, System.Double itemSpacing) [0x0000a] in
11-15 11:18:38.018 I/MonoDroid(14858): at Syncfusion.ListView.XForms.GridLayout.GetItemSize (Syncfusion.ListView.XForms.GridViewRowInfo rowInfo, System.Double& rowHeight, System.Double itemSpacing) [0x00039] in
11-15 11:18:38.018 I/MonoDroid(14858): at Syncfusion.ListView.XForms.GridLayout.SetRowHeight (System.Int32 rowIndex, Syncfusion.ListView.XForms.GridViewRowInfo rowInfo, System.Double itemSpacing) [0x00020] in
11-15 11:18:38.018 I/MonoDroid(14858): at Syncfusion.ListView.XForms.GridLayout.EnsureItems (Syncfusion.GridCommon.ScrollAxis.VisibleLinesCollection visibleLines) [0x003d9] in
11-15 11:18:38.018 I/MonoDroid(14858): at Syncfusion.ListView.XForms.VisualContainer.EnsureItems () [0x0002c] in
11-15 11:18:38.018 I/MonoDroid(14858): at Syncfusion.ListView.XForms.VisualContainer.OnSizeAllocated (System.Double width, System.Double height) [0x00040] in
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:784
11-15 11:18:38.018 I/MonoDroid(14858): at Xamarin.Forms.Layout.ForceLayout () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:125
11-15 11:18:38.018 I/MonoDroid(14858): at Syncfusion.ListView.XForms.Control.Helpers.SfListViewHelper.InvalidateForceLayout (Xamarin.Forms.Layout`1[T] view) [0x00000] in
11-15 11:18:38.019 I/MonoDroid(14858): at Syncfusion.ListView.XForms.GridLayout.OnItemsCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00195] in
11-15 11:18:38.019 I/MonoDroid(14858): at Syncfusion.ListView.XForms.SfListView.DisplayItems_CollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00029] in
11-15 11:18:38.019 I/MonoDroid(14858): at Syncfusion.DataSource.DisplayItems.RaiseCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs args) [0x00008] in <8efea32ea6f54af58d91766f271396b2>:0
11-15 11:18:38.019 I/MonoDroid(14858): at Syncfusion.DataSource.DataSource.UpdateCollectionView (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x000ef] in <8efea32ea6f54af58d91766f271396b2>:0
11-15 11:18:38.019 I/MonoDroid(14858): at Syncfusion.DataSource.DataSource.OnSourceCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00018] in <8efea32ea6f54af58d91766f271396b2>:0
11-15 11:18:38.019 I/MonoDroid(14858): at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00018] in /Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:263
11-15 11:18:38.019 I/MonoDroid(14858): at BoxPlanner.Toolbox.TrulyObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x000df] in C:\Users\Micha\source\repos\BoxPlannerMobile\BoxPlanner\BoxPlanner\Toolbox\TrulyObservableCollection.cs:77
11-15 11:18:38.019 I/MonoDroid(14858): at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:338
11-15 11:18:38.019 I/MonoDroid(14858): at System.Collections.ObjectModel.ObservableCollection`1[T].InsertItem (System.Int32 index, T item) [0x0001a] in /Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:196
11-15 11:18:38.019 I/MonoDroid(14858): at System.Collections.ObjectModel.Collection`1[T].Add (T item) [0x00020] in /Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/external/corefx/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs:71
11-15 11:18:38.019 I/MonoDroid(14858): at BoxPlanner.Views.Pages.Detail.ParticipationDetailPageModel.ViewIsAppearing (System.Object sender, System.EventArgs e) [0x0023c] in C:\Users\Micha\source\repos\BoxPlannerMobile\BoxPlanner\BoxPlanner\Views\Pages\Detail\ParticipationDetailPageModel.cs:285
11-15 11:18:38.019 I/MonoDroid(14858): at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.
11-15 11:18:38.019 I/MonoDroid(14858): at Android.App.SyncContext+<>c__DisplayClass2_0.
11-15 11:18:38.019 I/MonoDroid(14858): at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in /Users/runner/runners/2.159.2/work/1/s/src/Mono.Android/Java.Lang/Thread.cs:36
11-15 11:18:38.019 I/MonoDroid(14858): at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in /Users/runner/runners/2.159.2/work/1/s/src/Mono.Android/obj/Release/android-28/mcw/Java.Lang.IRunnable.cs:81
11-15 11:18:38.019 I/MonoDroid(14858): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.55(intptr,intptr)