This repository has been archived by the owner on May 1, 2024. It is now read-only.
[Android] ObjectDisposedException on Xamarin Forms Listview #2793
Labels
p/Android
s/needs-info ❓
A question has been asked that requires an answer before work can continue on this issue.
Description
This error occurs when navigating between pages with complex-row listviews. Since no user code is involved it's not possible to catch and handle the exception.
Note: This has been split off as a separate bug from Issue #2421 and #2406 , based on guidance from @hartez. There are at least three other related issues.
Steps to Reproduce
Navigating pages and scrolling and coming back and forth causes the application to crash.
Expected Behavior
Should work fine
Actual Behavior
App crashes a lot while navigating to and fro pages
Basic Information
Version with issue: Latest
Last known good version: NA (tried on all versions starting 2.3)
IDE:VS 2017
Platform Target Frameworks:
Android: 8.0
Android Support Library Version: 26.1.1
Nuget Packages:
Affected Devices: Tested on Samsung Note 8, Mi Note 4 etc.
StackTrace
Xamarin caused by: android.runtime.JavaProxyThrowable: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Xamarin.Forms.Platform.Android.FormsTextView'.
Java.Interop.JniPeerMembers.AssertSelf(IJavaPeerable self):0
Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeNonvirtualVoidMethod(string encodedMember, IJavaPeerable self, JniArgumentValue* parameters):0
Android.Widget.TextView.set_TextFormatted(ICharSequence value):0
Android.Widget.TextView.set_Text(string value):0
Xamarin.Forms.Platform.Android.LabelRenderer.UpdateText()<8783e2b68568446a8522c36407e66253>:0
Xamarin.Forms.Platform.Android.LabelRenderer.OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)<8783e2b68568446a8522c36407e66253>:0
.invoke_void_object_PropertyChangedEventArgs(object, PropertyChangedEventArgs)(wrapper delegate-invoke)
Xamarin.Forms.BindableObject.OnPropertyChanged(string propertyName)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.Element.OnPropertyChanged(string propertyName)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindableObject.SetValueActual(BindableProperty property, BindableObject.BindablePropertyContext context, object value, bool currentlyApplying, BindableObject.SetValueFlags attributes, bool silent)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindableObject.SetValueCore(BindableProperty property, object value, BindableObject.SetValueFlags attributes, BindableObject.SetValuePrivateFlags privateAttributes)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindableObject.SetValue(BindableProperty property, object value, bool fromStyle, bool checkAccess)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindableObject.SetValue(BindableProperty property, object value)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.Label.set_Font(Font value)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.Label.OnFontAttributesChanged(BindableObject bindable, object oldValue, object newValue)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindableObject.SetValueActual(BindableProperty property, BindableObject.BindablePropertyContext context, object value, bool currentlyApplying, BindableObject.SetValueFlags attributes, bool silent)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindableObject.SetValueCore(BindableProperty property, object value, BindableObject.SetValueFlags attributes, BindableObject.SetValuePrivateFlags privateAttributes)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindableObject.SetValue(BindableProperty property, object value, bool fromStyle, bool checkAccess)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindableObject.SetValue(BindableProperty property, object value, bool fromStyle)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.Setter.Apply(BindableObject target, bool fromStyle)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.TriggerBase.OnConditionChanged(BindableObject bindable, bool oldValue, bool newValue)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindingCondition.OnBoundPropertyChanged(BindableObject bindable, object oldValue, object newValue)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindableObject.SetValueActual(BindableProperty property, BindableObject.BindablePropertyContext context, object value, bool currentlyApplying, BindableObject.SetValueFlags attributes, bool silent)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindableObject.SetValueCore(BindableProperty property, object value, BindableObject.SetValueFlags attributes, BindableObject.SetValuePrivateFlags privateAttributes)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindingExpression.ApplyCore(object sourceObject, BindableObject target, BindableProperty property, bool fromTarget)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindingExpression.Apply(bool fromTarget)<6e20d7af277949f4a7bb952d64b81cda>:0
Xamarin.Forms.BindingExpression.BindingExpressionPart.b__47_0()<6e20d7af277949f4a7bb952d64b81cda>:0
Java.Lang.Thread.RunnableImplementor.Run():0
Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this):0
at (wrapper dynamic-method) System.Object:3fe218c1-7013-47c8-b862-f4ab1ae0ff0f (intptr,intptr)
mono.java.lang.RunnableImplementor.n_run(Native Method)
mono.java.lang.RunnableImplementor.run()RunnableImplementor.java:30
android.os.Handler.handleCallback()Handler.java:754
android.os.Handler.dispatchMessage()Handler.java:95
android.os.Looper.loop()Looper.java:163
android.app.ActivityThread.main()ActivityThread.java:6205
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:904
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:794
Reproduction Link
https://github.com/xamarin/Xamarin.Forms/files/1898088/xp.zip
The text was updated successfully, but these errors were encountered: