Bug 53333 - Trigger finalization can cause ObjectDisposedException
Summary: Trigger finalization can cause ObjectDisposedException
Status: RESOLVED DUPLICATE of bug 52834
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-03-14 23:33 UTC by Philipp Sumi
Modified: 2017-06-16 14:42 UTC (History)
2 users (show)

Tags: trigger crash
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 DUPLICATE of bug 52834

Description Philipp Sumi 2017-03-14 23:33:34 UTC
There's still something wrong with triggers - I see rare occasions in HockeyApp, and just encountered a crash after tapping an item that would trigger navigation:


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-03-17 16:04:57 UTC
Is there any reproduction you could upload, by chance, even if it's something that only happens a small portion of the time?
Comment 2 Philipp Sumi 2017-03-17 19:39:27 UTC
Sorry Paul: I double-reported this one. More context here:
https://bugzilla.xamarin.com/show_bug.cgi?id=52834
Comment 3 Paul DiPietro [MSFT] 2017-06-16 14:42:57 UTC

*** This bug has been marked as a duplicate of bug 52834 ***