Bug 59813 - "NullReferenceException" in "Xamarin.Forms.Platform.iOS.Renderers.LabelRenderer.cs" within "UpdateText()" & "UpdateTextColor()"
Summary: "NullReferenceException" in "Xamarin.Forms.Platform.iOS.Renderers.LabelRender...
Status: NEEDINFO
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS (show other bugs)
Version: 2.4.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-28 10:56 UTC by Mathias Hartner
Modified: 2017-10-17 04:22 UTC (History)
8 users (show)

See Also:
Tags:
Is this bug a regression?: Yes
Last known good build: 2.3.5.239-pre3


Attachments

Description Mathias Hartner 2017-09-28 10:56:00 UTC
Hey guys,

I have yet another bug for you...Here's the stack trace for "UpdateTextColor()":

2017-09-27 16:41:32.255 [1] [Error] An unhandled exception occurred and was caught by global exception handler CurrentDomainOnUnhandledException. System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Forms.Platform.iOS.LabelRenderer.UpdateTextColor () [0x00026] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\LabelRenderer.cs:319 
  at Xamarin.Forms.Platform.iOS.LabelRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x0005b] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\LabelRenderer.cs:146 
  at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x0000a] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:137 
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:388 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x000f4] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:593 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:390 
  at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:174 
  at Xamarin.Forms.BindingExpression.Apply (System.Boolean fromTarget) [0x0003e] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:56 
  at Xamarin.Forms.BindingExpression+BindingExpressionPart.<PropertyChanged>b__47_0 () [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:551 
  at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/src/Foundation/NSAction.cs:163 
  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/src/UIKit/UIApplication.cs:79 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/src/UIKit/UIApplication.cs:63 
  at XXX.Mobile.iOS.Application.Main (System.String[] args) [0x0001b] in D:\Sources\XXXCollection\Branches\MobileBranch\Mobile\XXX.Mobile.iOS\Main.cs:21

Stacktrace for "UpdateText()":

2017-09-27 17:03:58.016 [1] [Error] An unhandled exception occurred and was caught by global exception handler CurrentDomainOnUnhandledException. System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Forms.Platform.iOS.LabelRenderer.UpdateText () [0x0006a] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\LabelRenderer.cs:285 
  at Xamarin.Forms.Platform.iOS.LabelRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00097] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\LabelRenderer.cs:150 
  at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x0000a] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:137 
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:388 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x000f4] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:593 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:390 
  at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:174 
  at Xamarin.Forms.BindingExpression.Apply (System.Boolean fromTarget) [0x0003e] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:56 
  at Xamarin.Forms.BindingExpression+BindingExpressionPart.<PropertyChanged>b__47_0 () [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:551 
  at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/src/Foundation/NSAction.cs:163 
  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/src/UIKit/UIApplication.cs:79 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/src/UIKit/UIApplication.cs:63 
  at XXX.Mobile.iOS.Application.Main (System.String[] args) [0x0001b] in D:\Sources\XXXCollection\Branches\MobileBranch\Mobile\XXX.Mobile.iOS\Main.cs:21

It happens within a list view which gets cyclically updated every second if it is visible. 
The list view only contains labels with different colors and is part of a child page within a carousel page.
It happens when swiping into the child page containing the list view (The list view has been updated with new items shortly before).

With Xamarin.Forms 2.3.5.239-pre3 everything is fine. Due to another bug I had to wait for 2.4.0.269-pre2 but that version had another bug and I had to wait for 2.4.0.275-pre3...But now I realized that all those new versions have this bug here that also prevent me from using them...Even with the newest version 2.4.0.280 the problem still exists!

It seems to be a never-ending story!!!

I hope the provided information is enough for you because I don't know what else I could provide you...

Kind regards,

Mathias Hartner
Comment 1 Paul DiPietro [MSFT] 2017-09-28 16:07:01 UTC
Can you give us a reproduction so we have the exact code you're using?
Comment 2 krispenner 2017-10-03 03:27:06 UTC
Xamarin.Forms 2.4.0.282
I also got the same error, unfortunately I have no idea which label is throwing this but it is within a ViewCell created from a data template for the list items in a list view after the ItemSource property's bound list as been cleared and the same number of items re-added.  Hope that can help a little bit!

Based on GitHub line 285 of iOS LabelRenderer is:
Control.Text = (string)values[1];  // is Control or values somehow null?

https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/Renderers/LabelRenderer.cs

Stack Trace:
  at Xamarin.Forms.Platform.iOS.LabelRenderer.UpdateText () [0x0006a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\LabelRenderer.cs:285 
  at Xamarin.Forms.Platform.iOS.LabelRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00097] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\LabelRenderer.cs:150 
  at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:137 
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:388 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x000f4] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:593 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:390 
  at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:174 
  at Xamarin.Forms.BindingExpression.Apply (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property) [0x0006b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:77 
  at Xamarin.Forms.Binding.Apply (System.Object newContext, Xamarin.Forms.BindableObject bindObj, Xamarin.Forms.BindableProperty targetProperty) [0x00042] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Binding.cs:126 
  at Xamarin.Forms.BindableObject.ApplyBindings (System.Boolean skipBindingContext) [0x0003b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:421 
  at Xamarin.Forms.BindableObject.ApplyBindings () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:125 
  at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x0005a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:119 
  at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:498 
  at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:341 
  at Xamarin.Forms.View.OnBindingContextChanged () [0x00042] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\View.cs:99 
  at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x00060] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:120 
  at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:498 
  at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:341 
  at Xamarin.Forms.Cell.OnBindingContextChanged () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Cells\Cell.cs:114 
  at Xamarin.Forms.BindableObject.BindingContextPropertyChanged (Xamarin.Forms.BindableObject bindable, System.Object oldvalue, System.Object newvalue) [0x0000e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:441 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00108] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:596 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:390 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0005f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:543 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:83 
  at Xamarin.Forms.BindableObject.set_BindingContext (System.Object value) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:24 
  at Xamarin.Forms.Internals.TemplatedItemsList`2+<UnhookItem>d__154[TView,TItem].MoveNext () [0x000b0] in <1982f4f36e0b4e118327ea411be26e7b>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018 
  at UIKit.UIKitSynchronizationContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/src/UIKit/UIKitSynchronizationContext.cs:24 
  at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/src/Foundation/NSAction.cs:163 
  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/src/UIKit/UIApplication.cs:79 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/src/UIKit/UIApplication.cs:63
Comment 3 krispenner 2017-10-03 04:15:45 UTC
I can confirm that the property Control is NULL in LabelRenderer on line 285 of the UpdateText() method.

Control.Text = (string)values[1];  // Control is null

https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/Renderers/LabelRenderer.cs

I confirmed this by overriding the LabelRenderer with a custom render and in the OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) method when the "Text" property has changed, the Control property is NULL and calling the base method then throws a NullReferenceException.

It may be some sort of a race condition, as it happens 80% of the time, the other 20% things work.

I don't think this happened prior to me adding a grouping to the list item source, and on the ListView specifying both the GroupHeaderTemplate for the grouping in the list and the GroupShortNameBinding for the jump list.
Comment 4 krispenner 2017-10-03 04:17:59 UTC
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The work around for  if anyone experiencing this, is unfortunately to disable item recycling, although my lists suck at scrolling now and they are huge.
CachingStrategy="RecycleElement" causes this issue.
CachingStrategy="RetainElement" never has an issue.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Comment 5 mailcannon 2017-10-03 09:53:34 UTC
take a look at https://bugzilla.xamarin.com/show_bug.cgi?id=59716
Comment 6 matteo 2017-10-03 13:15:16 UTC
Even with RetainElement I have the same problem...
Comment 7 mailcannon 2017-10-04 04:47:05 UTC
I have the problem with lists and labels only with RetainElement and  RecycleElement solves it for me. So the workarround is not universal. Actual thing is never solves even if labels are not in lists. And not only labels. It's something with PropertyChanged notifications.
To make your lists a little bit stable you need to mix and play with: CachingStrategy, HasUnevenRows and ViewCell template, from my testing
Comment 8 krispenner 2017-10-04 06:57:37 UTC
Yes, I agree, I found another issue related to this when refreshing the items in one of my ListViews I get the below stack trace.  You can see it has to do with 
Xamarin.Forms.Platform.iOS.ListViewRenderer+UnevenListViewDataSource.CalculateHeightForCell

which based on you mentioning HasUnevenRows, I realized all these errors in ListView and Label renderers all started immediately after I set HasUnevenRows to true on all my ListViews so I could have a smaller GroupHeader row.

I have now switched HasUnevenRows back to false (small price to pay with larger group header rows than I wanted) and I have also re-enabled RecycleElement on all my ListViews.  Every ListView now has no issues and they scroll very fast due to (RecycleElement).

Can anyone confirm with setting HasUnevenRows to false if this issue goes away for them?



System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Forms.Platform.iOS.EventTracker.LoadRecognizers () [0x0005d] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\EventTracker.cs:347 
  at Xamarin.Forms.Platform.iOS.EventTracker.OnElementChanged (System.Object sender, Xamarin.Forms.Platform.iOS.VisualElementChangedEventArgs e) [0x0004e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\EventTracker.cs:413 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x0002c] in <c95050a8f6d640e8927ac3f95b517dff>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00118] in <c95050a8f6d640e8927ac3f95b517dff>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <c95050a8f6d640e8927ac3f95b517dff>:0 
  at Xamarin.Forms.Platform.iOS.RendererPool.UpdateRenderers (Xamarin.Forms.Element newElement) [0x0008c] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\RendererPool.cs:152 
  at Xamarin.Forms.Platform.iOS.RendererPool.UpdateNewElement (Xamarin.Forms.VisualElement newElement) [0x00080] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\RendererPool.cs:78 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00050] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:151 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnRendererElementChanged (System.Object sender, Xamarin.Forms.Platform.iOS.VisualElementChangedEventArgs args) [0x0000f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:134 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x0002c] in <c95050a8f6d640e8927ac3f95b517dff>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00118] in <c95050a8f6d640e8927ac3f95b517dff>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <c95050a8f6d640e8927ac3f95b517dff>:0 
  at Xamarin.Forms.Platform.iOS.ListViewRenderer+UnevenListViewDataSource.CalculateHeightForCell (UIKit.UITableView tableView, Xamarin.Forms.Cell cell) [0x00035] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\ListViewRenderer.cs:727 
  at Xamarin.Forms.Platform.iOS.ListViewRenderer+UnevenListViewDataSource.GetEstimatedRowHeight (UIKit.UITableView table) [0x0005d] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\ListViewRenderer.cs:671 
  at Xamarin.Forms.Platform.iOS.ListViewRenderer.UpdateEstimatedRowHeight () [0x0005f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\ListViewRenderer.cs:394 
  at Xamarin.Forms.Platform.iOS.ListViewRenderer.UpdateItems (System.Collections.Specialized.NotifyCollectionChangedEventArgs e, System.Int32 section, System.Boolean resetWhenGrouped) [0x000b9] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\ListViewRenderer.cs:515 
  at Xamarin.Forms.Platform.iOS.ListViewRenderer.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\ListViewRenderer.cs:298 
  at Xamarin.Forms.Internals.TemplatedItemsList`2[TView,TItem].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000a] in <1982f4f36e0b4e118327ea411be26e7b>:0 
  at Xamarin.Forms.Internals.TemplatedItemsList`2[TView,TItem].OnCollectionChangedGrouped (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x000e3] in <1982f4f36e0b4e118327ea411be26e7b>:0 
  at Xamarin.Forms.Internals.TemplatedItemsList`2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e, System.Boolean fixWindows) [0x00008] in <1982f4f36e0b4e118327ea411be26e7b>:0 
  at Xamarin.Forms.Internals.TemplatedItemsList`2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in <1982f4f36e0b4e118327ea411be26e7b>:0 
  at Xamarin.Forms.ListProxy.OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\ListProxy.cs:233 
  at Xamarin.Forms.ListProxy+<>c__DisplayClass33_0.<OnCollectionChanged>b__0 () [0x00018] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\ListProxy.cs:206 
  at Xamarin.Forms.ListProxy.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x000a0] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\ListProxy.cs:225 
  at Xamarin.Forms.ListProxy+WeakNotifyProxy.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00031] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\ListProxy.cs:394
Comment 9 matteo 2017-10-04 08:24:46 UTC
The problem occurs even with HasUnevenRows set to false.

The main problem is only on the Label component.
Each times, at the third 'pull to refresh' gesture, the app crash

If instead to bind the Text property I set a fixed value (for example 'test') then the app work without crash, even after the third 'pull to refresh action'
Comment 10 matteo 2017-10-04 08:36:16 UTC
I roll back to xf 2.3.5.239-pre6
Now it works
Comment 11 Mathias Hartner 2017-10-12 10:53:06 UTC
@Xamarin-Team: Is there any progress here? Is the provided information enough for you guys ti figure it out? Can you please tell us when to expect this issue to be resolved?
Comment 12 Shane 2017-10-17 04:22:14 UTC
@matteo thanks for the insight with the bindings. Changing over to just setting things manually instead of using bindings worked well for now

Note You need to log in before you can comment on or make changes to this bug.