Bug 52834 - LabelRenderer crashes app: Cannot Access Disposed Object
Summary: LabelRenderer crashes app: Cannot Access Disposed Object
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
URL:
: 53333 ()
Depends on:
Blocks:
 
Reported: 2017-02-27 09:29 UTC by Philipp Sumi
Modified: 2018-02-07 20:58 UTC (History)
8 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Philipp Sumi 2017-02-27 09:29:02 UTC
This seems to be binding/trigger related. I cannot reproduce this reliably, but it happened a few times already.
However, the combination of "Finalize" and the triggers that are running havoc will hopefully point you into the right direction...


Xamarin caused by: android.runtime.JavaProxyThrowable: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Xamarin.Forms.Platform.Android.LabelRenderer'.
Java.Interop.JniPeerMembers.AssertSelf(IJavaPeerable self)<a043032cf94a485190047a14918b9f60>:0
Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualInt32Method(string encodedMember, IJavaPeerable self, JniArgumentValue* parameters)<a043032cf94a485190047a14918b9f60>:0
Android.Views.View.get_Visibility()<9eb16c47cc8f4aa6b6ac4abed5ff79de>:0
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateIsVisible()<eb359c236c114333af68797a04051d05>:0
Xamarin.Forms.Platform.Android.VisualElementTracker.HandlePropertyChanged(object sender, PropertyChangedEventArgs e)<eb359c236c114333af68797a04051d05>:0
<Module>.invoke_void_object_PropertyChangedEventArgs(object, PropertyChangedEventArgs)(wrapper delegate-invoke)
Xamarin.Forms.BindableObject.OnPropertyChanged(string propertyName)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.Element.OnPropertyChanged(string propertyName)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.BindableObject.SetValueActual(BindableProperty property, BindableObject.BindablePropertyContext context, object value, bool currentlyApplying, BindableObject.SetValueFlags attributes, bool silent)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.BindableObject.SetValueCore(BindableProperty property, object value, BindableObject.SetValueFlags attributes, BindableObject.SetValuePrivateFlags privateAttributes)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.BindableObject.SetValue(BindableProperty property, object value, bool fromStyle, bool checkAccess)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.BindableObject.SetValue(BindableProperty property, object value, bool fromStyle)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.Setter.UnApply(BindableObject target, bool fromStyle)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.TriggerBase.OnConditionChanged(BindableObject bindable, bool oldValue, bool newValue)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.MultiCondition.OnAggregatedStatePropertyChanged(BindableObject bindable, object oldValue, object newValue)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.BindableObject.SetValueActual(BindableProperty property, BindableObject.BindablePropertyContext context, object value, bool currentlyApplying, BindableObject.SetValueFlags attributes, bool silent)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.BindableObject.SetValueCore(BindableProperty property, object value, BindableObject.SetValueFlags attributes, BindableObject.SetValuePrivateFlags privateAttributes)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.BindableObject.SetValue(BindableProperty property, object value, bool fromStyle, bool checkAccess)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.BindableObject.SetValue(BindableProperty property, object value)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.MultiCondition.OnConditionChanged(BindableObject bindable, bool oldValue, bool newValue)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.BindingCondition.OnBoundPropertyChanged(BindableObject bindable, object oldValue, object newValue)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.BindableObject.ClearValue(BindableProperty property, bool checkaccess)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.BindableObject.ClearValue(BindableProperty property)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.BindingCondition.TearDown(BindableObject bindable)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.MultiCondition.TearDown(BindableObject bindable)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.TriggerBase.OnDetachingFrom(BindableObject bindable)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.TriggerBase.Xamarin.Forms.IAttachedObject.DetachFrom(BindableObject bindable)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.AttachedCollection<T>.OnDetachingFrom(BindableObject bindable)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.AttachedCollection<T>.DetachFrom(BindableObject bindable)<fbc781766f1246e99fdbb495ea74f095>:0
Xamarin.Forms.VisualElement.Finalize()<fbc781766f1246e99fdbb495ea74f095>:0
Comment 1 Paul DiPietro [MSFT] 2017-02-27 14:16:45 UTC
Hi Philipp -- Do you mind uploading a reproduction even if it doesn't have 100% reliability?
Comment 2 Philipp Sumi 2017-03-16 11:51:26 UTC
Hi Paul

I'm afraid I can't - I didn't even know where this would happen. However, my money is on this one here:

Xamarin.Forms.MultiCondition.OnConditionChanged

I had a control that used a MultiTrigger - I removed that and handled the coercion in code and haven't had the issue anymore. It's very rare though, so I don't know whether this fixed it. Here's the old code - HTH.

<?xml version="1.0" encoding="UTF-8"?>

<ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:controls="clr-namespace:Ridr.Client.Controls;assembly=Ridr.Client"
             x:Class="Ridr.Client.Controls.IconAndTextLabel">
  
    <ContentView.GestureRecognizers>
      <TapGestureRecognizer Tapped="OnTapped" />
    </ContentView.GestureRecognizers>
  
    <ContentView.Content>

        <Grid x:Name="LayoutRoot"
              ColumnSpacing="0"
              HorizontalOptions="{Binding HorizontalOptions}">

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <!--
              The icon font is not fixed size, which leads to variable widths of the first column - this looks bad if multiple icons
              are stacked. Also, a fixed margin is problematic for the second column, as it doesn't scale with font sizes.
              As a somewhat hacky solution, I just use a wide invisible character with the same font size as a spacer.
              (Alternative: use a fixed factor, e.g. x/3, and multiply it with the fontsize using a converter)
            -->
            <Label IsVisible="{Binding IconKey, Converter={StaticResource StringToBoolConverter}}"
                   TextColor="Transparent"
                   Text="Wi"
                   FontSize="{Binding FontSize}"
                   Grid.Column="0" />

            <controls:XIconLabel FontSize="{Binding FontSize}"
                                 IsVisible="{Binding IconKey, Converter={StaticResource StringToBoolConverter}}"
                                 TextColor="{Binding TextColor}"
                                 VerticalTextAlignment="Center"
                                 HorizontalTextAlignment="Center"
                                 Text="{Binding IconKey}"
                                 Grid.Column="0" />

            <!-- spacer between columns - visible if we have both icon and text (otherwise screws with horizontal alignments) -->
            <Label Text="a"
                   FontSize="{Binding FontSize}"
                   IsVisible="False"
                   TextColor="Transparent"
                   Grid.Column="1">
                <Label.Triggers>
                    <MultiTrigger TargetType="Label">
                        <MultiTrigger.Conditions>
                            <BindingCondition Binding="{Binding IconKey, Converter={StaticResource StringToBoolConverter}}"
                                              Value="True" />
                            <BindingCondition Binding="{Binding Text, Converter={StaticResource StringToBoolConverter}}"
                                              Value="True" />
                        </MultiTrigger.Conditions>
                        <Setter Property="IsVisible" Value="True" />
                    </MultiTrigger>
                </Label.Triggers>
            </Label>

            <Label Text="{Binding Text}"
                   FontSize="{Binding FontSize}"
                   TextColor="{Binding TextColor}"
                   VerticalTextAlignment="Center"
                   Grid.Column="2" />
            
            <Grid.Triggers>
                <DataTrigger TargetType="Grid" Binding="{Binding IsEnabled}" Value="False">
                    <Setter Property="Opacity" Value="0.3" />
                </DataTrigger>
            </Grid.Triggers>
        </Grid>
    </ContentView.Content>
</ContentView>
Comment 3 Stephen Marcus 2017-05-02 06:17:21 UTC
I am also having this error, but do not have any multi triggers.

My error dump:

UNHANDLED EXCEPTION:
05-01 23:08:06.412 I/MonoDroid( 6413): System.ObjectDisposedException: Cannot access a disposed object.
05-01 23:08:06.413 I/MonoDroid( 6413): Object name: 'Xamarin.Forms.Platform.Android.LabelRenderer'.
05-01 23:08:06.413 I/MonoDroid( 6413):   at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00030] in /Users/builder/data/lanes/4468/b16fb820/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.cs:153 
05-01 23:08:06.413 I/MonoDroid( 6413):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00002] in /Users/builder/data/lanes/4468/b16fb820/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:21 
05-01 23:08:06.413 I/MonoDroid( 6413):   at Android.Views.View.set_Alpha (System.Single value) [0x00017] in /Users/builder/data/lanes/4468/b16fb820/source/monodroid/src/Mono.Android/platforms/android-25/src/generated/Android.Views.View.cs:4124 
05-01 23:08:06.413 I/MonoDroid( 6413):   at Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateOpacity () [0x00017] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:324 
05-01 23:08:06.413 I/MonoDroid( 6413):   at Xamarin.Forms.Platform.Android.VisualElementTracker.HandlePropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x002fa] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:142 
05-01 23:08:06.413 I/MonoDroid( 6413):   at Xamarin.Forms.Platform.Android.VisualElementTracker.HandleRedrawNeeded (System.Object sender, Xamarin.Forms.EventArg`1[T] e) [0x00015] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:152 
05-01 23:08:06.413 I/MonoDroid( 6413):   at Xamarin.Forms.VisualElement.BatchCommit () [0x00024] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:409 
05-01 23:08:06.413 I/MonoDroid( 6413):   at Xamarin.Forms.AnimationExtensions.HandleTweenerUpdated (System.Object o, System.EventArgs args) [0x0004f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\AnimationExtensions.cs:273 
05-01 23:08:06.413 I/MonoDroid( 6413):   at Xamarin.Forms.Tweener.<Start>b__22_0 (System.Int64 step) [0x00037] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Tweener.cs:78 
05-01 23:08:06.413 I/MonoDroid( 6413):   at Xamarin.Forms.Internals.Ticker.SendSignals (System.Int32 timestep) [0x00050] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Internals\Ticker.cs:72 
05-01 23:08:06.413 I/MonoDroid( 6413):   at Xamarin.Forms.Platform.Android.AndroidTicker.OnValOnUpdate (System.Object sender, Android.Animation.ValueAnimator+AnimatorUpdateEventArgs e) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AndroidTicker.cs:41 
05-01 23:08:06.413 I/MonoDroid( 6413):   at Android.Animation.ValueAnimator+IAnimatorUpdateListenerImplementor.OnAnimationUpdate (Android.Animation.ValueAnimator animation) [0x0000d] in /Users/builder/data/lanes/4468/b16fb820/source/monodroid/src/Mono.Android/platforms/android-25/src/generated/Android.Animation.ValueAnimator.cs:146 
05-01 23:08:06.413 I/MonoDroid( 6413):   at Android.Animation.ValueAnimator+IAnimatorUpdateListenerInvoker.n_OnAnimationUpdate_Landroid_animation_ValueAnimator_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_animation) [0x00011] in /Users/builder/data/lanes/4468/b16fb820/source/monodroid/src/Mono.Android/platforms/android-25/src/generated/Android.Animation.ValueAnimator.cs:95 
05-01 23:08:06.413 I/MonoDroid( 6413):   at (wrapper dynamic-method) System.Object:1ea3efdc-8dca-4bec-b897-4a1c83336018 (intptr,intptr,intptr)
05-01 23:08:06.415 D/Mono    ( 6413): Assembly Ref addref HockeySDK.AndroidBindings[0x7f91c5f000] -> System[0x7f91d18000]: 21
05-01 23:08:06.424 W/art     ( 6413): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable


I get this when I run PostMan calls and then go through a few UI screens.  But I have also seen it in response to returning form hibernation.

Please help.  I can send our project, though it is fairly large.
Comment 4 Paul DiPietro [MSFT] 2017-06-15 21:37:20 UTC
If you can upload a project if this still occurs against the latest pre or nightly builds, that would be helpful. It would be extremely preferable if we can get something minimized to look at though. For sake of upkeep, I'm just setting to needinfo until we get a repro to look at for the time being.
Comment 5 Paul DiPietro [MSFT] 2017-06-16 14:42:57 UTC
*** Bug 53333 has been marked as a duplicate of this bug. ***
Comment 6 Mike Norman 2017-06-20 17:45:24 UTC
Hi. Since we don't have a repro solution on this one, even one that only intermittently reproduces this issue, I'm going to close this (for now) as not reproducible. Feel free to reactivate this bug with a repro solution at any time. Thank you!
Comment 7 Mustafa Jalil 2017-07-18 04:08:08 UTC
Resuming app gets me an error

Object reference not set to an instance of an object (System.NullReferenceException)
	  at Xamarin.Forms.Platform.iOS.LabelRenderer.UpdateText () [0x0004f] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\LabelRenderer.cs:257 
	  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:133 
	  at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
	  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00012] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  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) [0x000fb] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.BindingExpression.Apply (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property) [0x0006b] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.Binding.Apply (System.Object newContext, Xamarin.Forms.BindableObject bindObj, Xamarin.Forms.BindableProperty targetProperty) [0x00042] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.BindableObject.ApplyBindings (System.Boolean skipBindingContext) [0x00043] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.BindableObject.ApplyBindings () [0x00000] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x0005a] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.View.OnBindingContextChanged () [0x00042] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x00060] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.Cell.OnBindingContextChanged () [0x00000] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.BindableObject.BindingContextPropertyChanged (Xamarin.Forms.BindableObject bindable, System.Object oldvalue, System.Object newvalue) [0x0000e] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  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) [0x0010e] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0005f] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.BindableObject.set_BindingContext (System.Object value) [0x00000] in <85ba51ae3e28448fa01c46e397f0e05e>:0 
	  at Xamarin.Forms.Internals.TemplatedItemsList`2+<UnhookItem>d__153[TView,TItem].MoveNext () [0x000b0] in <85ba51ae3e28448fa01c46e397f0e05e>: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/10.10.0.36/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/10.10.0.36/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/4691/d2270eec/source/xamarin-macios/src/UIKit/UIKitSynchronizationContext.cs:24 
	  at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/4691/d2270eec/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/4691/d2270eec/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/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:63
Comment 8 Mustafa Jalil 2017-07-18 04:40:42 UTC
Hey,

After spending some time digging around the web and finally looking into the xamarin forms code, looks like LabelRenderer.cs: line 257 is the culprit:

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

this line is causing me some pain, should it not be something like

Control.Text = (string)values[1] ?? "";