Xamarin.forms: System.ObjectDisposedException: no se puede acceder a un objeto eliminado 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'

Creado en 20 may. 2020  ·  73Comentarios  ·  Fuente: xamarin/Xamarin.Forms

_Este problema se ha movido de un ticket en la comunidad de desarrolladores ._


Después de actualizar a Xamarin Forms 4.6.0726, comienza a tener fallas intermitentes frecuentes en Android. Tras la investigación, descubrió que esto proviene de LabelRenderer de Xamarin

05-17 07: 27: 06.656 E / mono (5133):
05-17 07: 27: 06.656 E / mono (5133): Excepción no controlada:
05-17 07: 27: 06.656 E / mono (5133): System.ObjectDisposedException: No se puede acceder a un objeto eliminado.
05-17 07: 27: 06.656 E / mono (5133): Nombre del objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
05-17 07: 27: 06.656 E / mono (5133): en (método dinámico contenedor) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.656 E / mono (5133): en (contenedor nativo a administrado) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.656 E / mono-rt (5133): [ERROR] EXCEPCIÓN FATAL SIN MANEJO: System.ObjectDisposedException: No se puede acceder a un objeto eliminado.
05-17 07: 27: 06.656 E / mono-rt (5133): Nombre del objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
05-17 07: 27: 06.656 E / mono-rt (5133): en (método dinámico contenedor) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.656 E / mono-rt (5133): en (contenedor nativo a administrado) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.698 D / (5133): HostConnection :: get () Nueva conexión de host establecida 0xbd1b1240, tid 5133

No estoy seguro de dónde viene. Tengo ListView como vista principal y me pregunto si algo anda mal con la versión más nueva de ListView que causa fugas y fallas.

No tengo un representador de etiquetas personalizado, por lo que debe provenir del representador de la plataforma de Xamarin
Por favor recomiende.


Comentarios originales

Sistema de comentarios de Visual Studio el 17/05/2020 a las 11:54 p.m.

Hemos dirigido sus comentarios al equipo de ingeniería correspondiente para una evaluación adicional. El equipo revisará los comentarios y le notificará sobre los próximos pasos.


Soluciones originales

(sin soluciones)

4.4.0 collectionview fastrenderers label listview 5 feedback-ticket high regression in-progress high impact Android unverified bug

Comentario más útil

¡Es completamente ridículo cómo Microsoft puede esperar usar esta plataforma para crear una aplicación empresarial con un defecto tan básico que aún se abra después de tantas quejas durante un período tan largo!

No hemos podido lanzar la actualización de nuestra versión de Android de la aplicación durante los últimos 4 meses y todo lo que obtenemos de este hilo es que no pueden reproducir esto, ¡cuando el resto del mundo puede hacerlo fácilmente!

Microsoft debería dejar de hacer cualquier cosa antes de que se pueda solucionar este error. ¡Lanzar cualquier versión más nueva de Xamarin es prácticamente inútil!

Todos 73 comentarios

Relacionado # 8262

Solución alternativa: https://github.com/xamarin/Xamarin.Forms/issues/8262#issuecomment -550022425

La creación de un renderizador personalizado para ListView o sus celdas es un enfoque para reducir el efecto de los cálculos de diseño en el rendimiento del desplazamiento.
Mejores prácticas de ListView: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/listview/performance

Intente implementar INotifyPropertyChanged (System.ComponentModel) para la clase que contiene ListView.
Configure el controlador para public event PropertyChangedEventHandler PropertyChanged siguiente manera para el acceso establecido de la propiedad modificada:

var args = new PropertyChangedEventArgs(nameOf(typeOf(string)));
PropertyChanged?.Invoke(this, args);

Relacionado # 10159

¿Puede adjuntar un pequeño proyecto que demuestre este problema? ¡Gracias!

También estoy enfrentando el mismo problema al bloquear mi aplicación

Seguimiento de pila:

Cannot access a disposed object. Object name: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
Java.Interop.JniPeerMembers.AssertSelf(Java.Interop.IJavaPeerable self) in <26521a5118b44c858c385715922b9d5d>
Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualObjectMethod(System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) in <26521a5118b44c858c385715922b9d5d>
Android.Views.View.get_Context() in <4ccdb3137d974856b786e1aeebbfbab6>
Xamarin.Forms.Platform.Android.Platform.GetNativeSize(Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:1341
Xamarin.Forms.Forms+AndroidPlatformServices.GetNativeSize(Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) in D:\a\1\s\Xamarin.Forms.Platform.Android\Forms.cs:930
Xamarin.Forms.VisualElement.OnSizeRequest(System.Double widthConstraint, System.Double heightConstraint) in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:800
Xamarin.Forms.VisualElement.OnMeasure(System.Double widthConstraint, System.Double heightConstraint) in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:783
Xamarin.Forms.VisualElement.GetSizeRequest(System.Double widthConstraint, System.Double heightConstraint) in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:659
Xamarin.Forms.VisualElement.Measure(System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:717
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) in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:163
Xamarin.Forms.StackLayout.CalculateLayout(Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:123
Xamarin.Forms.StackLayout.OnSizeRequest(System.Double widthConstraint, System.Double heightConstraint) in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:80
Xamarin.Forms.VisualElement.OnMeasure(System.Double widthConstraint, System.Double heightConstraint) in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:783
Xamarin.Forms.VisualElement.GetSizeRequest(System.Double widthConstraint, System.Double heightConstraint) in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:659
Xamarin.Forms.Layout.GetSizeRequest(System.Double widthConstraint, System.Double heightConstraint) in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:132
Xamarin.Forms.VisualElement.Measure(System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:717
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) in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:198
Xamarin.Forms.StackLayout.CalculateLayout(Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:123
Xamarin.Forms.StackLayout.LayoutChildren(System.Double x, System.Double y, System.Double width, System.Double height) in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:58
Xamarin.Forms.Layout.UpdateChildrenLayout() in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:266
Xamarin.Forms.Layout.OnSizeAllocated(System.Double width, System.Double height) in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:224
Xamarin.Forms.VisualElement.SizeAllocated(System.Double width, System.Double height) in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:805
Xamarin.Forms.Layout.ResolveLayoutChanges() in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:392
Java.Lang.Thread+RunnableImplementor.Run() in <4ccdb3137d974856b786e1aeebbfbab6>
Java.Lang.IRunnableInvoker.n_Run(System.IntPtr jnienv, System.IntPtr native__this) in <4ccdb3137d974856b786e1aeebbfbab6>
(wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.48(intptr,intptr)

La degradación de XF a la versión 4.4.0.991864 resolvió el problema en nuestra aplicación de producción. Créditos: https://github.com/xamarin/Xamarin.Forms/issues/10159#issuecomment -633838442

¿Puede adjuntar un pequeño proyecto que demuestre este problema? ¡Gracias!

@samhouts No puedo publicar el código fuente, es una aplicación comercial ... y solo puede funcionar con datos.

¿Puede adjuntar un pequeño proyecto que demuestre este problema? ¡Gracias!

@samhouts lamentablemente no puedo publicar el código por motivos contractuales

Hola, solo estoy comprobando si hay algún cronograma para cuando la solución esté disponible. Tenemos una versión importante en marcha y ahora está en espera solo por este problema después de que actualizamos nuestro marco de Xamarin. En este punto tampoco podemos volver al marco anterior.

Por favor ayuda.

Estos problemas son muy difíciles de resolver sin una reproducción. Es posible que pueda solucionarlo habilitando los renderizadores heredados . Si puede publicar un proyecto de reproducción, es posible que podamos resolver el problema por completo. ¡Gracias!

Estos problemas son muy difíciles de resolver sin una reproducción. Es posible que pueda solucionarlo habilitando los renderizadores heredados . Si puede publicar un proyecto de reproducción, es posible que podamos resolver el problema por completo. ¡Gracias!

Entiendo, estoy intentando reproducir en un proyecto de prueba.

Estos problemas son muy difíciles de resolver sin una reproducción. Es posible que pueda solucionarlo habilitando los renderizadores heredados. Si puede publicar un proyecto de reproducción, es posible que podamos resolver el problema por completo. ¡Gracias!

@samhouts , intenté habilitar los renderizadores heredados según las instrucciones proporcionadas, pero, sorprendentemente, ¡el error aún persiste!

Intenté limpiar la solución, cerrando / abriendo VS pero el error aún persiste.

Por favor recomiende. ¡Cualquier ayuda en este sentido sería de gran ayuda!

Hola,

¿Intenta hacer un seguimiento para ver si hay actualizaciones todavía o cuándo esperar actualizaciones sobre esto?

También estamos experimentando el problema, es realmente difícil de reproducir, la aplicación se bloquea al azar,
El problema comenzó a ocurrir después de actualizar de Xamarin form 4.4 a 4.6.0726.

Necesito mover esto al recurso bloqueado hasta que podamos obtener una reproducción.

@samhouts Esto se parece mucho al # 10159, que es un problema bastante serio. ¿Puedes echarle un vistazo? Hay un comentario que ofrece una muestra de reproducción.

He creado un repositorio de muestra donde puede ver esta excepción: https://github.com/nacompllo/CannotDisposeLabelRenderer

También publiqué un video que muestra cómo reproducir el error:
https://www.youtube.com/watch?v=yDhlI4BG8D8&feature=youtu.be

Descripción

Cuando agrego un enlace a la propiedad FontSize de una etiqueta dentro de un CollectionView y hago rotaciones con el dispositivo (en cada cambio de rotación actualizo el FontSize de las etiquetas de CollectionView).

System.ObjectDisposedException: 'No se puede acceder a un objeto eliminado.
Nombre del objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'. '

Pasos para reproducir

Agregue elementos al origen de CollectionView mientras realiza rotaciones con el dispositivo.

Información básica

  • Solo lo he probado en Android ya que no tengo dispositivos Apple.
  • Xamarin.Forms 4.7.0.1239
  • Android 10

@samhouts Después de hacer algunas pruebas en mi máquina con el repositorio de Xamarin.Forms he seguido el rastro del error y ocurre exactamente en esta línea de la clase Platform.cs: https://github.com/xamarin/Xamarin.Forms /blob/29b92aa1fc2b9d834bb3b95cc224e07d0cc3e9b4/Xamarin.Forms.Platform.Android/Platform.cs#L1341

Envolví el método en una captura de prueba para obtener StackTrace y este es el resultado:
en Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] en: 0
en Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue * parámetros) [0x00000] en: 0
en Android.Views.View.get_Context () [0x00000] en /Users/builder/azdo/_work/204/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-29/mcw/Android .Views.View.cs: 5598
en Xamarin.Forms.Platform.Android.Platform.GetNativeSize (vista Xamarin.Forms.VisualElement, System.Double widthConstraint, System.Double heightConstraint) [0x0001c] en C: Users \ SourceReposXamarin.FormsXamarin.Forms.Platform.Android: 1343

¿Alguien tiene la solución para esto?

Estoy enfrentando el mismo error en mi proyecto. Tengo la versión Xamarin.Forms 4.6.0.726.
Seguimiento de pila:

  at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <dac4c5a4b77f4e61a5e6d9d3050dfb9f>:0 
  at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <dac4c5a4b77f4e61a5e6d9d3050dfb9f>:0 
  at Android.Views.View.get_Context () [0x00000] in /Users/builder/azdo/_work/204/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-29/mcw/Android.Views.View.cs:5598 
  at Xamarin.Forms.Platform.Android.Platform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:1341 
  at Xamarin.Forms.Forms+AndroidPlatformServices.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\Forms.cs:930 
  at Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00025] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:800 
  at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:783 
  at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:659 
  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:717 
  at Xamarin.Forms.Grid.CalculateAutoCells (System.Double width, System.Double height) [0x000e5] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:133 
  at Xamarin.Forms.Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) [0x0000c] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:485 
  at Xamarin.Forms.Grid.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002a] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:60 
  at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:783 
  at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:659 
  at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:132 
  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:717 
  at Xamarin.Forms.TemplatedView.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0003c] in D:\a\1\s\Xamarin.Forms.Core\TemplatedView.cs:43 
  at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:783 
  at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:659 
  at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:132 
  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:717 
  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 
  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 
  at Xamarin.Forms.StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:80 
  at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:783 
  at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:659 
  at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:132 
  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:717 
  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 
  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 
  at Xamarin.Forms.StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:80 
  at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:783 
  at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:659 
  at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:132 
  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:717 
  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 
  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 
  at Xamarin.Forms.StackLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x0004e] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:58 
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:266 
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:224 
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:805 
  at Xamarin.Forms.Layout.ResolveLayoutChanges () [0x0005c] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:392 
  at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in /Users/builder/azdo/_work/204/s/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:36 
  at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in /Users/builder/azdo/_work/204/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-29/mcw/Java.Lang.IRunnable.cs:81 
  at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.1(intptr,intptr)

La ventana de resultados de la aplicación muestra estos resultados:

[mono] Excepción no controlada:
[mono] System.ObjectDisposedException: No se puede acceder a un objeto eliminado.
[mono] Nombre del objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
[mono] en (método dinámico contenedor) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)
[mono] en (contenedor nativo a administrado) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)
[mono-rt] [ERROR] EXCEPCIÓN FATAL SIN MANEJO: System.ObjectDisposedException: No se puede acceder a un objeto eliminado.
[mono-rt] Nombre del objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
[mono-rt] en (método dinámico contenedor) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)

Puedo reproducir esto en nuestro repositorio, intenté algo como:

if (visualElementRenderer is IDisposedState disposableRenderer && disposableRenderer.IsDisposed)
    return new SizeRequest();

Pero eso no funciona con el mismo problema.

Obtengo algo similar en 4.7.0.1179 cuando navego de una página que contiene un CollectionView a otra que contiene un CollectionView:

LayoutPresenter.OnMeasure (System.Double widthConstraint, System.Double heightConstraint)

System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.

JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) JniPeerMembers+JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) View.get_Context () Platform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) Forms+AndroidPlatformServices.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) LayoutPresenter.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) TemplatedView.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) Grid.MeasuredStarredColumns (System.Double widthConstraint, System.Double heightConstraint) Grid.MeasureAndContractStarredColumns (System.Double width, System.Double height, System.Double totalStarsWidth) Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) Grid.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) StackLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) Layout.UpdateChildrenLayout () Layout.OnSizeAllocated (System.Double width, System.Double height) VisualElement.SizeAllocated (System.Double width, System.Double height) Layout.ResolveLayoutChanges () Thread+RunnableImplementor.Run () IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.59(intptr,intptr)

Solo algunos hallazgos sobre esto @samhouts :
También vimos este comportamiento con CollectionView. Después de dedicarle un tiempo, parece que podría deberse a los siguientes eventos.

Nota: esta es una teoría.

  1. OnViewRecycled se llama en ItemsViewAdapter con un TemplatedItemViewHolder.
  2. Se llama a TemplatedItemViewHolder.Recycle, el Xamarin.Forms.View asociado con TemplatedItemViewHolder se quita de ItemsView.
  3. El TemplatedItemViewHolder se inserta en RecyclerView.RecycledViewPool.
  4. Algo se deshace de la Vista / sus hijos mientras tanto.
  5. El ViewHolder se vuelve a enlazar y se muestra, los desencadenadores de diseño se producen en la vista eliminada y la aplicación se bloquea.

Trabajé en torno a esto anulando ItemsViewAdapter.OnViewRecycled y volviendo para un TemplatedItemViewHolder. Luego agregué código para eliminar TemplatedItemViewHolder.View de ItemsView en OnBindViewHolder, antes de llamar a base.

Hasta ahora, ninguno de los que lo ha intentado ha podido reproducir el problema.

@joshuangfraedom , ¿puede compartir su código de muestra para el cambio de adaptador y veré si eso lo soluciona por favor?

Algo como esto @DuncWatts

... 
namespace and renderer export
...
class MyCollectionViewRenderer : CollectionViewRenderer
{
        protected override GroupableItemsViewAdapter<GroupableItemsView, IGroupableItemsViewSource> CreateAdapter()
        {
            return new MyCollectionViewAdapter(ItemsView);
        }

        private class MyCollectionViewAdapter : ExtendedCollectionViewAdapter
        {
            ... base constructor call

            /// <inheritdoc />
            public override void OnViewRecycled(JObject holder)
            {
                if (holder is TemplatedItemViewHolder)
                {
                    return;
                }

                base.OnViewRecycled(holder);
            }

            /// <inheritdoc />
            public override void OnBindViewHolder(ViewHolder holder, int position)
            {
                if (holder is TemplatedItemViewHolder templatedItemViewHolder)
                {
                    ItemsView.RemoveLogicalChild(templatedItemViewHolder.View);
                }

                base.OnBindViewHolder(holder, position);
            }
        }
}

Al leer SelectableItemsViewAdapter , parece que lo anterior introducirá una pérdida de memoria. Realmente necesitamos que esto se resuelva a nivel de formularios para una solución adecuada (todo está internalizado en esa clase).

Esto es un poco más robusto y creo que maneja todas las cosas seleccionables según @DuncWatts @samhouts anterior. Todavía no sé qué es exactamente la eliminación de los renderizadores de Cell.

Pero mantener la referencia en ItemsView parece evitar que se limpie lo suficientemente bien.

    public class MyCollectionViewRenderer : ExtendedCollectionViewRenderer
    {
        private static readonly FieldInfo CurrentViewHoldersField;
        private static readonly Action<SelectableItemsViewAdapter<GroupableItemsView, IGroupableItemsViewSource>, object, int> ViewHolderClicked;
        private static readonly Func<SelectableItemsViewAdapter<GroupableItemsView, IGroupableItemsViewSource>, int, bool> PositionIsSelected;

        static MyCollectionViewRenderer()
        {
            CurrentViewHoldersField = // SelectableItemsViewAdapter._currentViewHolders via reflection
            ViewHolderClicked = // Gets SelectableItemsViewAdapter.SelectableClicked via reflection as a delegate
            PositionIsSelected =  // Gets SelectableItemsViewAdapter.PositionIsSelected via reflection as a delegate
        }

        public MyCollectionViewRenderer(Context context) : base(context)
        {
        }

        protected override GroupableItemsViewAdapter<GroupableItemsView, IGroupableItemsViewSource> CreateAdapter()
        {
            return new MyCollectionViewAdapter(
                groupableItemsView: ItemsView,
                tapColour: GetTapColour(),
                allowItemSelection: Element.SelectionMode != SelectionMode.None,
                viewAppearing: Element.ViewAppearing);
        }

        private class MyCollectionViewAdapter : GroupableItemsViewAdapter<GroupableItemsView, IGroupableItemsViewSource>
        {
            protected internal MyCollectionViewAdapter(GroupableItemsView groupableItemsView, Func<View, Context, ItemContentView> createView = null)
                : base(groupableItemsView,  createView)
            {
            }

            public override void OnViewRecycled(Java.Lang.Object holder)
            {
                // Prevent cleanup of the TemplatedItemViewHolder.
                // This cleanup looks to be the cause of the problem,
                // as it drops references to it's Xamarin Forms view.
                if (holder is TemplatedItemViewHolder templatedItemViewHolder)
                {
                    // Allows selection to be cleared in SelectableItemsViewAdapter.
                    var currentViewHolders = (List<SelectableViewHolder>)CurrentViewHoldersField.GetValue(this);
                    currentViewHolders.Remove(templatedItemViewHolder);
                    return;
                }

                base.OnViewRecycled(holder);
            }

            public override void OnBindViewHolder(ViewHolder holder, int position)
            {
                // If TemplatedItemViewHolder, do the stuff we want to do, plus the stuff forms was doing.
                // Except for SelectableItemAdapter. We don't want their events.
                // Thank you Xamarin team for using "Bind" on TemplatedItemViewHolder.
                if (holder is TemplatedItemViewHolder templatedItemViewHolder)
                {
                    // Remove the child from ItemsView, as TemplatedItemViewHolder.Bind(ItemsView) will
                    // Re-add it later on.
                    ItemsView.RemoveLogicalChild(templatedItemViewHolder.View);

                    if (ItemsSource.IsHeader(position))
                    {
                        templatedItemViewHolder.Bind(ItemsView.Header, ItemsView);
                    }
                    else if (ItemsSource.IsFooter(position))
                    {
                        templatedItemViewHolder.Bind(ItemsView.Footer, ItemsView);
                    }
                    else
                    {
                        // Also accounts for group header/group footer
                        templatedItemViewHolder.Bind(ItemsSource.GetItem(position), ItemsView);
                    }

                    // Allows selection to be cleared in SelectableItemsViewAdapter.
                    var currentViewHolders = (List<SelectableViewHolder>)CurrentViewHoldersField.GetValue(this);
                    currentViewHolders.Add(templatedItemViewHolder);

                    // Make sure that if this item is one of the selected items, it's marked as selected
                    templatedItemViewHolder.IsSelected = PositionIsSelected(this, position);
                    return;
                }

                base.OnBindViewHolder(holder, position);
            }

            public override void OnViewAttachedToWindow(JObject holder)
            {
                base.OnViewAttachedToWindow(holder);

                if (holder is TemplatedItemViewHolder templatedItemViewHolder)
                {
                    // Watch for clicks so the user can select the item held by this ViewHolder
                    // This replaces the click events triggered in SelectableItemViewHolder
                    // but still invokes SelectableItemsViewAdapter.SelectableClicked.
                    // I find these safer to use than click events when tied to Java objects.
                    templatedItemViewHolder.ItemView.SetOnClickListener(
                        ClickListener.With(
                            v => ViewHolderClicked(this, v, templatedItemViewHolder.AdapterPosition)));
                }
            }

            public override void OnViewDetachedFromWindow(JObject holder)
            {
                base.OnViewDetachedFromWindow(holder);

                if (holder is TemplatedItemViewHolder templatedItemViewHolder)
                {
                    templatedItemViewHolder.ItemView.SetOnClickListener(null);
                }
            }
        }
    }

Una mejor solución para esto podría incluso ser borrar la Vista en TemplatedItemViewHolder.Recycle y luego ejecutar todo en la rama templateChanging nuevamente. Parece un enfoque más seguro, pero requeriría volver a implementar un montón de cosas si el cambio no se realiza en el código base de XF. No creo que sea confiable confiar en que la Vista y sus renderizadores se conservarán entre Reciclar y Vincular.

No puedo reprochar esto, pero la causa en nuestra aplicación fue un enlace que se inició en la interfaz de usuario que estaba en proceso de eliminación (eliminada del árbol visual).
Afortunadamente para nosotros, el modo de enlace solo necesitaba establecerse en OneTime para solucionar el problema.

Tengo el mismo problema de bloqueo con Xamarin.Forms 4.6.0.847.
Obtengo este seguimiento de la pila de fallos cuando me SfComboBox de Syncfusion (v18.2.0.44) . Creo que la etiqueta en eso se estrella.

@ Edgaras91 mi experiencia también fue usando syncfusion SfComboBox. Un elemento en ItemTemplate estaba vinculando IsVisible a una propiedad en el modelo de vista (IsSelected).
Cuando se realizó una nueva selección, que cierra el menú desplegable del cuadro combinado, el restablecimiento de las propiedades IsSelected de los modelos ItemSource vinculados estaba causando el bloqueo.
Cambiar el modo de encuadernación a OneTime resolvió el problema.

@ Edgaras91 mi experiencia también fue usando syncfusion SfComboBox. Un elemento en ItemTemplate estaba vinculando IsVisible a una propiedad en el modelo de vista (IsSelected).
Cuando se realizó una nueva selección, que cierra el menú desplegable del cuadro combinado, el restablecimiento de las propiedades IsSelected de los modelos ItemSource vinculados estaba causando el bloqueo.
Cambiar el modo de encuadernación a OneTime resolvió el problema.

Gracias @InquisitorJax por eso, sin embargo, cambiar mi modelo de enlace DataSource a OneTime no resolvió mi problema de bloqueo.

Más información sobre cómo reproducir este bloqueo que podría ayudar a otros:

En una vista con SfComboBox y datos en su DataSource, todo es estable.
Luego, cuando abro una "ventana emergente" usando Rg.Plugins.Popup reutilizando el mismo ViewModel que BindingContext y lo dejo abierto durante 3 segundos y cerrando esta ventana emergente, luego cambiando el valor en el SfComboBox original 2 veces seleccionando desde el menú desplegable, arrojará la excepción LabelRenderer.

La razón por la que todavía no publico en Syncfusion es que la excepción son los formularios Xamarin puros. Todavía tengo que probar la solución alternativa de reversión de la versión de Xamarin sugerida.

Puedo confirmar que, para mí, XF 4.4.0.991864 NO lo solucionó, todavía obteniendo la misma excepción.

Formularios de Xamarin 4.8.0.1364

JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) JniPeerMembers+JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) View.get_Context () Platform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) Forms+AndroidPlatformServices.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) TemplatedView.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) Grid.CalculateAutoCells (System.Double width, System.Double height) Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) Grid.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) Layout.UpdateChildrenLayout () Layout.OnSizeAllocated (System.Double width, System.Double height) VisualElement.SizeAllocated (System.Double width, System.Double height) Layout.ResolveLayoutChanges () Thread+RunnableImplementor.Run () IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this)

Este problema se puede reproducir en vistas de colección con plantillas de elementos. Esto se ha convertido en un error crítico para nosotros.

Tenemos un selector de plantillas de vista de colección y las plantillas consisten en un componente expandible y la aplicación se bloquea con la siguiente excepción al hacer clic en el ícono expandible.

Nota: la capacidad de expansión se logra simplemente configurando visible false y configurando el tamaño de la fila de la cuadrícula principal en Auto.

No solo LabelRenderer, también activa la excepción ImageRenderer, cuando no hay etiquetas en la vista expandible.

`09-10 20: 20: 28.104 E / AppCenterCrashes (23119): Excepción no controlada de source = AndroidEnvironment
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): System.ObjectDisposedException: No se puede acceder a un objeto eliminado.
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): Nombre del objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.ImageRenderer'.
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] en: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue * parámetros): 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Android.Views.View.get_Context () [0x0000a] en <55654ebe9f2a48e6bade2862bb243f94>: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.Platform.Android.Platform.GetNativeSize (vista Xamarin.Forms.VisualElement, System.Double widthConstraint, System.Double heightConstraint) [0x00019] en D : a1sXamarin.Forms.Platform.AndroidPlatform.cs: 1341
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.Forms + AndroidPlatformServices.GetNativeSize (vista Xamarin.Forms.VisualElement, System.Double widthConstraint, System.Double heightConstraint) [0x00000] en D: a1sXamarin .Forms.Platform.AndroidForms.cs: 921
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00025] en D: a1sXamarin.Forms.CoreVisualElement.cs: 854
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.Image.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] en D: a1sXamarin.Forms.CoreImage.cs: 74
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] en D: a1sXamarin.Forms.CoreVisualElement.cs: 837
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] en D: a1sXamarin.Forms.CoreVisualElement.cs: 713
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] en D: a1sXamarin.Forms .CoreVisualElement.cs: 771
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.Grid.CalculateAutoCells (System.Double ancho, System.Double alto) [0x002a3] en D: a1sXamarin.Forms.CoreGridCalc.cs: 166
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) [0x0000c] en D: a1sXamarin.Forms.CoreGridCalc .cs: ​​576
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.Grid.LayoutChildren (System.Double x, System.Double y, System.Double ancho, System.Double altura) [0x0000e] en D: a1sXamarin.Forms.CoreGridCalc.cs: 18
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] en D: a1sXamarin.Forms.CoreLayout.cs: 266
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.Layout.OnSizeAllocated (System.Double ancho, System.Double alto) [0x0000f] en D: a1sXamarin.Forms.CoreLayout.cs: 224
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] en D: a1sXamarin.Forms.CoreVisualElement.cs: 859
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Xamarin.Forms.Layout.ResolveLayoutChanges () [0x0005c] en D: a1sXamarin.Forms.CoreLayout.cs: 392
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Java.Lang.Thread + RunnableImplementor.Run () [0x00008] en <55654ebe9f2a48e6bade2862bb243f94>: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] en <55654ebe9f2a48e6bade2862bb243f94>: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): en (método dinámico contenedor) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)

System.ObjectDisposedException: 'No se puede acceder a un objeto eliminado.
Nombre del objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.ImageRenderer'. ''

¡Es completamente ridículo cómo Microsoft puede esperar usar esta plataforma para crear una aplicación empresarial con un defecto tan básico que aún se abra después de tantas quejas durante un período tan largo!

No hemos podido lanzar la actualización de nuestra versión de Android de la aplicación durante los últimos 4 meses y todo lo que obtenemos de este hilo es que no pueden reproducir esto, ¡cuando el resto del mundo puede hacerlo fácilmente!

Microsoft debería dejar de hacer cualquier cosa antes de que se pueda solucionar este error. ¡Lanzar cualquier versión más nueva de Xamarin es prácticamente inútil!

Mi solución a esta excepción (probar las versiones XF de 4.5.X a 4.8.X antes para asegurarme de que el cambio de versión no funcione):
Punto de vista: CarouselView (como modal) mantiene etiquetas con números (seleccionando la cantidad de producto en el carrito). Este control solo se muestra si el usuario desea cambiar la cantidad. Esta excepción se activaba cuando la vista de carrusel se ocultaba, pero aún estaba "conectada" a la vinculación List <> y SelectedItem.
Solución: rellenar este control en xaml.cs directamente después de que se activara el evento Clicked. De esta forma, este control no está conectado con la clase ViewModel / PageModel.
Esta solución es una simulación de encuadernación:
`` c #
// _counts es CarouselView
private void QuantityChangeTapped (objeto remitente, System.EventArgs e) // evento de botón
{
CartItem item = (remitente como Vista) .BindingContext como CartItem; // producto en el carrito cuya cantidad va a cambiar
_viewModel.Item = elemento; // establecer la cantidad ya guardada
_counts.ItemsSource = Enumerable.Range (1, item.QuantityRemaining) .ToList ();
_counts.Position = item.Quantity - 1; // desplaza el carrusel a la cantidad ya guardada
ShowSlider (); // mostrar carrusel
}
private void CountApprouveClicked (remitente del objeto, System.EventArgs e) // evento del botón llamado "guardar cantidad seleccionada"
{
CloseSlider ();
_viewModel.SelectedCount = (int) _counts.CurrentItem;
_viewModel.OnCountApprouve.Execute (nulo);
}

''

Me encontré con este de nuevo, solo que no había controles de Syncfusion involucrados.
Simplemente un elemento en un DataTemplate que tenía un enlace IsVisible al ViewModel.
Sin embargo, la solución fue la misma: establezca BindingMode en OneTime.

¿Alguien que esté viendo este problema puede probar con el nuget aquí?

https://dev.azure.com/xamarin/public/_build/results?buildId=25860&view=artifacts&type=publishedArtifacts

Y luego avíseme si todavía ve la excepción.

¿Alguien que esté viendo este problema puede probar con el nuget aquí?

https://dev.azure.com/xamarin/public/_build/results?buildId=25860&view=artifacts&type=publishedArtifacts

Y luego avíseme si todavía ve la excepción.

Acabo de probar el nugget que publicaste y sigue ocurriendo una excepción, la única diferencia con la excepción anterior es que en lugar de referirse a Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer ahora la excepción se refiere a Xamarin.Forms.Platform.Android. Platform + DefaultRenderer

Nueva excepción:

System.ObjectDisposedException: 'Cannot access a disposed object.
Object name: 'Xamarin.Forms.Platform.Android.Platform+DefaultRenderer'.'

Excepción anterior:

System.ObjectDisposedException: 'Cannot access a disposed object.
Object name: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.'

@nacompllo, ¿puedes publicar todo el stacktrace? Me doy cuenta de que probablemente solo sea una línea diferente, pero aún así sería útil tener el rastro completo aquí

@PureWeen Probé el nuget y todavía falla, pero la pila es un poco diferente

09-12 22:30:00.522 I/MonoDroid( 5147): UNHANDLED EXCEPTION:
09-12 22:30:00.524 I/MonoDroid( 5147): System.ObjectDisposedException: Cannot access a disposed object.
09-12 22:30:00.524 I/MonoDroid( 5147): Object name: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
09-12 22:30:00.524 I/MonoDroid( 5147):   at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <42748fcc36b74733af2d9940a8f3cc8e>:0 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <42748fcc36b74733af2d9940a8f3cc8e>:0 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Android.Views.View.get_Context () [0x0000a] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.Platform.Android.Platform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x0001b] in D:\agent\1\s\Xamarin.Forms.Platform.Android\Platform.cs:1345 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.Forms+AndroidPlatformServices.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x00001] in D:\agent\1\s\Xamarin.Forms.Platform.Android\Forms.cs:921 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002d] in D:\agent\1\s\Xamarin.Forms.Core\VisualElement.cs:814 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00001] in D:\agent\1\s\Xamarin.Forms.Core\VisualElement.cs:799 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00070] in D:\agent\1\s\Xamarin.Forms.Core\VisualElement.cs:689 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00064] in D:\agent\1\s\Xamarin.Forms.Core\VisualElement.cs:741 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x0009d] in D:\agent\1\s\Xamarin.Forms.Core\Layout.cs:133 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.Grid.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00177] in D:\agent\1\s\Xamarin.Forms.Core\GridCalc.cs:49 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00173] in D:\agent\1\s\Xamarin.Forms.Core\Layout.cs:239 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x00011] in D:\agent\1\s\Xamarin.Forms.Core\Layout.cs:203 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\agent\1\s\Xamarin.Forms.Core\VisualElement.cs:817 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.Layout.ResolveLayoutChanges () [0x0008b] in D:\agent\1\s\Xamarin.Forms.Core\Layout.cs:374 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Xamarin.Forms.Platform.Android.Platform+DefaultRenderer.OnMeasure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00016] in D:\agent\1\s\Xamarin.Forms.Platform.Android\Platform.cs:1309 
09-12 22:30:00.524 I/MonoDroid( 5147):   at Android.Views.View.n_OnMeasure_II (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00008] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 
09-12 22:30:00.524 I/MonoDroid( 5147):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.28(intptr,intptr,int,int)
09-12 22:30:00.532 E/AppCenterCrashes( 5147): Unhandled Exception from source=AndroidEnvironment
09-12 22:30:00.532 E/AppCenterCrashes( 5147): System.ObjectDisposedException: Cannot access a disposed object.
09-12 22:30:00.532 E/AppCenterCrashes( 5147): Object name: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <42748fcc36b74733af2d9940a8f3cc8e>:0 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <42748fcc36b74733af2d9940a8f3cc8e>:0 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Android.Views.View.get_Context () [0x0000a] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.Platform.Android.Platform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x0001b] in D:\agent\1\s\Xamarin.Forms.Platform.Android\Platform.cs:1345 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.Forms+AndroidPlatformServices.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x00001] in D:\agent\1\s\Xamarin.Forms.Platform.Android\Forms.cs:921 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002d] in D:\agent\1\s\Xamarin.Forms.Core\VisualElement.cs:814 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00001] in D:\agent\1\s\Xamarin.Forms.Core\VisualElement.cs:799 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00070] in D:\agent\1\s\Xamarin.Forms.Core\VisualElement.cs:689 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00064] in D:\agent\1\s\Xamarin.Forms.Core\VisualElement.cs:741 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x0009d] in D:\agent\1\s\Xamarin.Forms.Core\Layout.cs:133 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.Grid.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00177] in D:\agent\1\s\Xamarin.Forms.Core\GridCalc.cs:49 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00173] in D:\agent\1\s\Xamarin.Forms.Core\Layout.cs:239 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x00011] in D:\agent\1\s\Xamarin.Forms.Core\Layout.cs:203 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\agent\1\s\Xamarin.Forms.Core\VisualElement.cs:817 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.Layout.ResolveLayoutChanges () [0x0008b] in D:\agent\1\s\Xamarin.Forms.Core\Layout.cs:374 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Xamarin.Forms.Platform.Android.Platform+DefaultRenderer.OnMeasure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00016] in D:\agent\1\s\Xamarin.Forms.Platform.Android\Platform.cs:1309 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at Android.Views.View.n_OnMeasure_II (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00008] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 
09-12 22:30:00.532 E/AppCenterCrashes( 5147):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.28(intptr,intptr,int,int)
09-12 22:30:00.539 D/Mono    ( 5147): Requesting loading reference 5 (of 6) of /storage/emulated/0/Android/data/com.Tandem.DoKapsyApp/files/.__override__/Microsoft.AppCenter.Crashes.dll
09-12 22:30:00.539 D/Mono    ( 5147): Loading reference 5 of /storage/emulated/0/Android/data/com.Tandem.DoKapsyApp/files/.__override__/Microsoft.AppCenter.Crashes.dll asmctx DEFAULT, looking for System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
09-12 22:30:00.539 D/Mono    ( 5147): Assembly Ref addref Microsoft.AppCenter.Crashes[0xec37f580] -> System.Core[0xec37e8c0]: 11
09-12 22:30:00.634 D/Mono    ( 5147): DllImport searching in: '__Internal' ('(null)').
09-12 22:30:00.634 D/Mono    ( 5147): Searching for 'java_interop_jnienv_throw'.
09-12 22:30:00.634 D/Mono    ( 5147): Probing 'java_interop_jnienv_throw'.
09-12 22:30:00.634 D/Mono    ( 5147): Found as 'java_interop_jnienv_throw'.
**System.ObjectDisposedException:** 'Cannot access a disposed object.
Object name: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.'


=================================================================
    Native Crash Reporting
=================================================================
Got a SEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

No native Android stacktrace (see debuggerd output).

=================================================================
    Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0xe79167fa):0xe79167ea  00 00 00 c7 47 18 00 00 00 00 74 7a 8b 3a 31 d2  ....G.....tz.:1.
0xe79167fa  8b 4f 04 f7 c1 00 01 00 00 0f 84 28 f9 ff ff a8  .O.........(....
0xe791680a  01 0f 85 c1 00 00 00 8b 57 18 85 d2 0f 84 de fd  ........W.......
0xe791681a  ff ff 8b b3 04 3b 00 00 3b 93 ac fb ff ff 8b 86  .....;..;.......

=============================================================09-12 22:30:01.742 I/MonoDroid( 5147): UNHANDLED EXCEPTION:

====
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at Java.Interop.NativeMethods:java_interop_jnienv_new_string <0x00012>
      at Strings:NewString <0x00077>
      at Strings:NewString <0x00147>
      at Android.Runtime.JNIEnv:NewString <0x0008f>
      at Java.Lang.Error:.ctor <0x000ff>
      at Android.Runtime.JavaProxyThrowable:.ctor <0x00067>
      at Java.Lang.Throwable:FromException <0x0012f>
      at Android.Runtime.AndroidEnvironment:UnhandledException <0x0039b>
      at Android.Runtime.DynamicMethodNameCounter:28 <0x00163>
      at Android.Runtime.DynamicMethodNameCounter:28 <0x000bf>
      at <unknown> <0xffffffff>
      at Java.Interop.NativeMethods:java_interop_jnienv_call_nonvirtual_void_method_a <0x00015>
      at InstanceMethods:CallNonvirtualVoidMethod <0x00353>
      at JniInstanceMethods:InvokeNonvirtualVoidMethod <0x00127>
      at Android.Views.View:Measure <0x00197>
      at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer:OnLayout <0x0037f>
      a09-12 22:30:01.743 I/MonoDroid( 5147): System.ObjectDisposedException: Cannot access a disposed object.

t Xamarin.Forms.Platform.Android.FormsViewGroup:n_OnLayout_ZIIII <0x000ca>
      at Android.Runtime.DynamicMethodNameCounter:40 <0x00147>
      at Android.Runtime.DynamicMethodNameCounter:40 <0x000f3>
      at <unknown> <0xffffffff>
      at Java.Interop.NativeMethods:java_interop_jnienv_call_nonvirtual_void_method_a <0x00015>
      at InstanceMethods:CallNonvirtualVoidMethod <0x00353>
      at JniInstanceMethods:InvokeVirtualVoidMethod <0x002df>
      at Xamarin.Forms.Platform.Android.FormsViewGroup:MeasureAndLayout <0x00397>
      at Xamarin.Forms.Platform.Android.VisualElementTracker:UpdateLayout <0x00797>
      at Xamarin.Forms.Platform.Android.VisualElementRenderer`1:UpdateLayout <0x000c3>
      at Xamarin.Forms.Platform.Android.MasterDetailContainer:OnLayout <0x003c6>
      at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailContainer:OnLayout <0x000db>
      at Android.Views.ViewGroup:n_OnLayout_ZIIII <0x000aa>
      at Android.Runtime.DynamicMethodNameCounter:27 <0x00147>
      at Android.Runtime.DynamicMethodNameCounter:27 <0x000f3>
      a09-12 22:30:01.743 I/MonoDroid( 5147): Object name: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.

t <unknown> <0xffffffff>
      at Java.Interop.NativeMethods:java_interop_jnienv_call_nonvirtual_void_method_a <0x00015>
      at InstanceMethods:CallNonvirtualVoidMethod <0x00353>
      at JniInstanceMethods:InvokeVirtualVoidMethod <0x002df>
      at AndroidX.DrawerLayout.Widget.DrawerLayout:OnLayout <0x002eb>
      at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer:OnLayout <0x00087>
      at AndroidX.DrawerLayout.Widget.DrawerLayout:n_OnLayout_ZIIII <0x000aa>
      at Android.Runtime.DynamicMethodNameCounter:31 <0x00147>
      at Android.Runtime.DynamicMethodNameCounter:31 <0x000f3>
      at <unknown> <0xffffffff>
      at Java.Interop.NativeMethods:java_interop_jnienv_call_nonvirtual_void_method_a <0x00015>
      at InstanceMethods:CallNonvirtualVoidMethod <0x00353>
      at JniInstanceMethods:InvokeNonvirtualVoidMethod <0x00127>
      at Android.Views.ViewGroup:Layout <0x00277>
      at Xamarin.Forms.Platform.Android.VisualElementTracker:UpdateLayout <0x0061a>
      at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRende09-12 22:30:01.743 I/MonoDroid( 5147):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.28(intptr,intptr,int,int)

rer:Xamarin.Forms.Platform.Android.IVisualElementRenderer.UpdateLayout <0x00067>
      at Xamarin.Forms.Platform.Android.AppCompat.Platform:Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout <0x00184>
      at Xamarin.Forms.Platform.Android.PlatformRenderer:OnLayout <0x00119>
      at Android.Views.ViewGroup:n_OnLayout_ZIIII <0x000aa>
      at Android.Runtime.DynamicMethodNameCounter:27 <0x00147>
      at Android.Runtime.DynamicMethodNameCounter:27 <0x000f3>
=================================================================09-12 22:30:01.743 I/MonoDroid( 5147):   at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.28(intptr,intptr,int,int)

09-12 22:30:01.743 I/MonoDroid( 5147):   at (wrapper managed-to-native) Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a(intptr,intptr&,intptr,intptr,intptr,intptr)
09-12 22:30:01.743 I/MonoDroid( 5147):   at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00079] in <42748fcc36b74733af2d9940a8f3cc8e>:0 
09-12 22:30:01.743 I/MonoDroid( 5147):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0001f] in <42748fcc36b74733af2d9940a8f3cc8e>:0 
09-12 22:30:01.743 I/MonoDroid( 5147):   at Android.Views.View.Measure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00035] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 
09-12 22:30:01.743 I/MonoDroid( 5147):   at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer+Container.OnMeasure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x000d0] in D:\agent\1\s\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:1223 
09-12 22:30:01.743 I/MonoDroid( 5147):   at Android.Views.View.n_OnMeasure_II (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00008] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 
09-12 22:30:01.743 I/MonoDroid( 5147):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.28(intptr,intptr,int,int)
09-12 22:30:01.746 F/libc    ( 5147): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x6f726578 in tid 5147 (ndem.DoKapsyApp), pid 5147 (ndem.DoKapsyApp)
[HotReload] (2020-09-12 22:30:03.9): INFO: (Tandem.DoKapsyApp.Android) Stopped Hot Reload session due to ExplicitlyEnded ...

@PureWeen
Adjunto toda la información que obtengo de la ventana de salida:

09-13 12: 37: 30.755 I / MonoDroid (21323): EXCEPCIÓN NO MANEJADA:
09-13 12: 37: 30.758 I / MonoDroid (21323): System.ObjectDisposedException: No se puede acceder a un objeto eliminado.
09-13 12: 37: 30.759 I / MonoDroid (21323): Nombre del objeto: 'Xamarin.Forms.Platform.Android.Platform + DefaultRenderer'.
09-13 12: 37: 30.759 I / MonoDroid (21323): en (método dinámico contenedor) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, bool, int, int, int, int)
09-13 12: 37: 30.759 I / MonoDroid (21323): en (contenedor nativo a administrado) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, int, int, int, int, int)
09-13 12: 37: 30.759 I / MonoDroid (21323): en (contenedor administrado a nativo) Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a (intptr, intptr &, intptr, intptr, intptr, intptr)
09-13 12: 37: 30.759 I / MonoDroid (21323): en Java.Interop.JniEnvironment + InstanceMethods.CallNonvirtualVoidMethod (instancia Java.Interop.JniObjectReference, tipo Java.Interop.JniObjectReference, método Java.Interop.JniMethodInfo, Java.Interop .JniArgumentValue * args) [0x00079] en <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 30.759 I / MonoDroid (21323): en Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue * parámetros) [0x0005d <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 30.759 I / MonoDroid (21323): en Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (System.Int32 p0, System.Int32 p1, System.Int32 p2, System.Int32 p3, System. Int32 p4, System.Int32 p5) [0x00088] en D: agent1sXamarin.Forms.Platform.Android.FormsViewGroupobjDebuggeneratedsrcXamarin.Forms.Platform.Android.FormsViewGroup.cs: 181
09-13 12: 37: 30.759 I / MonoDroid (21323): en Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () [0x0015c] en D: agent1sXamarin.Forms.Platform.AndroidVisualElementTracker.cs: 111
09-13 12: 37: 30.759 I / MonoDroid (21323): en Xamarin.Forms.Platform.Android.VisualElementRenderer`1 [TElement] .UpdateLayout () [0x00014] en D: agent1sXamarin.Forms.Platform.AndroidVisualElementRenderer`1 139
09-13 12: 37: 30.759 I / MonoDroid (21323): en Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout (System.Boolean cambiado, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0002f] en D: agent1sXamarin.Forms.Platform.AndroidAppCompatPlatform.cs: 235
09-13 12: 37: 30.759 I / MonoDroid (21323): en Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (System.Boolean cambiado, System.Int32 l, System.Int32 t, System.Int32 r, System. Int32 b) [0x0001d] en D: agent1sXamarin.Forms.Platform.AndroidPlatformRenderer.cs: 75
09-13 12: 37: 30.759 I / MonoDroid (21323): en Android.Views.ViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean cambiado, System.Int32 l, System.Int32 t, System .Int32 r, System.Int32 b) [0x00008] en <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 30.759 I / MonoDroid (21323): en (método dinámico contenedor) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, bool, int, int, int, int)
System.ObjectDisposedException: 'No se puede acceder a un objeto eliminado.
Nombre del objeto: 'Xamarin.Forms.Platform.Android.Platform + DefaultRenderer'. '

09-13 12: 37: 33.822 E / mono (21323):
09-13 12: 37: 33.822 E / mono (21323): Excepción no controlada:
09-13 12: 37: 33.822 E / mono (21323): System.ObjectDisposedException: No se puede acceder a un objeto eliminado.
09-13 12: 37: 33.822 E / mono (21323): Nombre del objeto: 'Xamarin.Forms.Platform.Android.Platform + DefaultRenderer'.
09-13 12: 37: 33.822 E / mono (21323): en (método dinámico contenedor) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, bool, int, int, int, int)
09-13 12: 37: 33.822 E / mono (21323): en (contenedor nativo a administrado) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, int, int, int, int, int)
09-13 12: 37: 33.822 E / mono (21323): en (contenedor administrado a nativo) Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a (intptr, intptr &, intptr, intptr, intptr, intptr)
09-13 12: 37: 33.822 E / mono (21323): en Java.Interop.JniEnvironment + InstanceMethods.CallNonvirtualVoidMethod (instancia Java.Interop.JniObjectReference, tipo Java.Interop.JniObjectReference, método Java.Interop.JniMethodInfo, Java.Interop .JniArgumentValue * args) [0x00079] en <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.822 E / mono (21323): en Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue * parámetros) [0x0005d <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.822 E / mono (21323): en Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (System.Int32 p0, System.Int32 p1, System.Int32 p2, System.Int32 p3, System. Int32 p4, System.Int32 p5) [0x00088] en D: agent1sXamarin.Forms.Platform.Android.FormsViewGroupobjDebuggeneratedsrcXamarin.Forms.Platform.Android.FormsViewGroup.cs: 181
09-13 12: 37: 33.822 E / mono (21323): en Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () [0x0015c] en D: agent1sXamarin.Forms.Platform.AndroidVisualElementTracker.cs: 111
09-13 12: 37: 33.822 E / mono (21323): en Xamarin.Forms.Platform.Android.VisualElementRenderer 1[TElement].UpdateLayout () [0x00014] in D:\agent\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:139 09-13 12:37:33.822 E/mono (21323): at Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout (System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0002f] in D:\agent\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:235 09-13 12:37:33.822 E/mono (21323): at Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0001d] in D:\agent\1\s\Xamarin.Forms.Platform.Android\PlatformRenderer.cs:75 09-13 12:37:33.822 E/mono (21323): at Android.Views.ViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x00008] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 09-13 12:37:33.822 E/mono (21323): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.27(intptr,intptr,bool,int,int,int,int) 09-13 12:37:33.822 E/mono (21323): --- End of stack trace from previous location where exception was thrown --- 09-13 12:37:33.822 E/mono (21323): 09-13 12:37:33.822 E/mono (21323): at Java.Interop.JniEnvironment+Strings.NewString (System.Char* unicodeChars, System.Int32 length) [0x0001e] in <42748fcc36b74733af2d9940a8f3cc8e>:0 09-13 12:37:33.822 E/mono (21323): at Java.Interop.JniEnvironment+Strings.NewString (System.String value) [0x00024] in <42748fcc36b74733af2d9940a8f3cc8e>:0 09-13 12:37:33.822 E/mono (21323): at Android.Runtime.JNIEnv.NewString (System.String text) [0x00009] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 09-13 12:37:33.822 E/mono (21323): at Java.Lang.Error..ctor (System.String message) [0x0001f] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 09-13 12:37:33.822 E/mono (21323): at Android.Runtime.JavaProxyThrowable..ctor (System.Exception innerException) [0x00007] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 09-13 12:37:33.822 E/mono (21323): at Java.Lang.Throwable.FromException (System.Exception e) [0x0001d] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 09-13 12:37:33.822 E/mono (21323): at Android.Runtime.AndroidEnvironment.UnhandledException (System.Exception e) [0x00067] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 09-13 12:37:33.822 E/mono (21323): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.27(intptr,intptr,bool,int,int,int,int) 09-13 12:37:33.822 E/mono (21323): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.27(intptr,intptr,int,int,int,int,int) 09-13 12:37:33.826 E/mono-rt (21323): [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Cannot access a disposed object. 09-13 12:37:33.826 E/mono-rt (21323): Object name: 'Xamarin.Forms.Platform.Android.Platform+DefaultRenderer'. 09-13 12:37:33.826 E/mono-rt (21323): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.33(intptr,intptr,bool,int,int,int,int) 09-13 12:37:33.826 E/mono-rt (21323): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.33(intptr,intptr,int,int,int,int,int) 09-13 12:37:33.826 E/mono-rt (21323): at (wrapper managed-to-native) Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a(intptr,intptr&,intptr,intptr,intptr,intptr) 09-13 12:37:33.826 E/mono-rt (21323): at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00079] in <42748fcc36b74733af2d9940a8f3cc8e>:0 09-13 12:37:33.826 E/mono-rt (21323): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0005d] in <42748fcc36b74733af2d9940a8f3cc8e>:0 09-13 12:37:33.826 E/mono-rt (21323): at Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (System.Int32 p0, System.Int32 p1, System.Int32 p2, System.Int32 p3, System.Int32 p4, System.Int32 p5) [0x00088] in D:\agent\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Debug\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:181 09-13 12:37:33.826 E/mono-rt (21323): at Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () [0x0015c] in D:\agent\1\s\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:111 09-13 12:37:33.826 E/mono-rt (21323): at Xamarin.Forms.Platform.Android.VisualElementRenderer 1 [TElement] .UpdateLayout () [0x00014] en D: agent1sXamarin.Forms.Platform .AndroidVisualElementRenderer.cs: 139
09-13 12: 37: 33.826 E / mono-rt (21323): en Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout (System.Boolean cambiado, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0002f] en D: agent1sXamarin.Forms.Platform.AndroidAppCompatPlatform.cs: 235
09-13 12: 37: 33.826 E / mono-rt (21323): en Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (System.Boolean cambiado, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0001d] en D: agent1sXamarin.Forms.Platform.AndroidPlatformRenderer.cs: 75
09-13 12: 37: 33.826 E / mono-rt (21323): en Android.Views.ViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean cambiado, System.Int32 l, System.Int32 t , System.Int32 r, System.Int32 b) [0x00008] en <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): en (método dinámico contenedor) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, bool, int, int, int, int)
09-13 12: 37: 33.826 E / mono-rt (21323): --- Fin del seguimiento de la pila desde la ubicación anterior donde se lanzó la excepción ---
09-13 12: 37: 33.826 E / mono-rt (21323):
09-13 12: 37: 33.826 E / mono-rt (21323): en Java.Interop.JniEnvironment + Strings.NewString (System.Char * unicodeChars, System.Int32 length) [0x0001e] en <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): en Java.Interop.JniEnvironment + Strings.NewString (System.String value) [0x00024] en <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): en Android.Runtime.JNIEnv.NewString (Texto de System.String) [0x00009] en <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): en Java.Lang.Error..ctor (mensaje System.String) [0x0001f] en <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): en Android.Runtime.JavaProxyThrowable..ctor (System.Exception innerException) [0x00007] en <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): en Java.Lang.Throwable.FromException (System.Exception e) [0x0001d] en <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): en Android.Runtime.AndroidEnvironment.UnhandledException (System.Exception e) [0x00067] en <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): en (método dinámico contenedor) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, bool, int, int, int, int) terminando

09-13 12: 37: 33.826 E / mono-rt (21323): en (contenedor nativo a administrado) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, int, int, int, int, int)
09-13 12: 37: 33.865 E / libc ++ abi (21323): terminando
09-13 12: 37: 33.866 F / libc (21323): Señal fatal 6 (SIGABRT), código -1 (SI_QUEUE) en tid 21323 (ame.labelrender), pid 21323 (ame.labelrender)

@nacompllo @Reveon

¡Prueba este y házmelo saber por favor!

https://dev.azure.com/xamarin/public/_build/results?buildId=26573&view=artifacts&type=publishedArtifacts

@PureWeen
Acabo de hacer la prueba con el nuevo nuget y parece que el problema se ha resuelto ya no se reproduce, parece que este nuget resuelve este problema. Buen trabajo.

@PureWeen hice una prueba rápida y parece que las excepciones se han ido

@PureWeen también confirmo que en este momento mi aplicación no

¡¡Increíble!!

@PureWeen , la excepción ya no ocurre con los nugets proporcionados. Leyenda.

¿Alguien puede explicar cómo instalar este "nuget" en Xamarin Forms?

@ Edgaras91 echa un vistazo a esto

@ Edgaras91 ,
Clic en el enlace.
A la derecha del panel "nuget" habrá un botón "más" (3 puntos verticales), en el menú contextual, seleccione "descargar [...]".
Luego configure (como mencionó @Reveon ) la fuente local de nugets locales en los archivos de su sistema (por ejemplo, "C: reposlocalNugets") y coloque el contenido del zip descargado en esta carpeta (habrá algunos archivos Xamarin .nupkg).
Luego, en su VS, abra el administrador de NuGet y desde este cuadro combinado
obraz
seleccione su fuente local (la mía se llama simplemente "local")
Finalmente, simplemente instale / actualice Xamarin.Forms al proyecto seleccionado como de costumbre.

Gracias @Reveon y @BartoszKopec . Sin embargo, también tengo integraciones continuas de Dev Ops, esto será divertido. ¡Espero que esta solución sea aprobada y se implemente lo antes posible!

@ Edgaras91 Estoy usando App Center como CI y tengo el mismo problema, ¡no puedo usarlo! 😄

También puede confirmar que esto parece estar resuelto.
@PureWeen, ¿sabemos cuál sería más o menos la eta para qué lanzamiento está programado?

  • gran trabajo clavando la causa por cierto;)

Hola,
Para las personas que tienen este problema: en mi caso, tuve varias etiquetas que cambiaron la visibilidad a través de IsVisible .
Lo cambié por BackGroundColor y TextColor es Color.Transparent o no, y el problema desapareció…
Espero que esto ayude ...

¿Esta corrección se incluirá en la próxima 4.8? ¿O solo 5.0?

Siguiente SR de 4.8

La misma excepción en 4.8.0.1451:

{InnerException: null  StackTrace:   at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <324349c9a2dd47568c91620d2bd3db5a>:0 
  at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <324349c9a2dd47568c91620d2bd3db5a>:0 
  at Android.Views.View.get_Context () [0x0000a] in <f69f42e19d884caca4279f1717610a26>:0 
  at Xamarin.Forms.Platform.Android.Platform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:1341 
  at Xamarin.Forms.Forms+AndroidPlatformServices.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\Forms.cs:921 
  at Xamarin.Forms.VisualElement.OnSizeRequest (Syst


    at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <324349c9a2dd47568c91620d2bd3db5a>:0 
  at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <324349c9a2dd47568c91620d2bd3db5a>:0 
  at Android.Views.View.get_Context () [0x0000a] in <f69f42e19d884caca4279f1717610a26>:0 
  at Xamarin.Forms.Platform.Android.Platform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:1341 
  at Xamarin.Forms.Forms+AndroidPlatformServices.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\Forms.cs:921 
  at Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00025] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:811 
  at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:796 
  at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:686 
  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:738 
  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) [0x00236] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:198 
  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 
  at Xamarin.Forms.StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:80 
  at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:796 
  at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:686 
  at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:113 
  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:738 
  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 
  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 
  at Xamarin.Forms.StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:80 
  at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:796 
  at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:686 
  at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:113 
  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:738 
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x0007b] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:133 
  at Xamarin.Forms.TemplatedView.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\TemplatedView.cs:29 
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:239 
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:203 
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:814 
  at Xamarin.Forms.Layout.ResolveLayoutChanges () [0x0005c] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:362 
  at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <f69f42e19d884caca4279f1717610a26>:0 
  at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <f69f42e19d884caca4279f1717610a26>:0 
  at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.36(intptr,intptr)


  Cannot access a disposed object.
Object name: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.


Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer

Java.Interop

System.ObjectDisposedException

No está en esa versión, deberá esperar a que Xamarin Form 4.8 Service Release 3

No está en esa versión, deberá esperar a que Xamarin Form 4.8 Service Release 3

@joshuangfraedom ¿

¿Cuándo está previsto que se publique? Cuánto tiempo hay que esperar ... :-)))

No estoy seguro, lo siento, parece que la solución para esto se encuentra actualmente en XF 5.0 Prerelease 1 si querías intentarlo. @samhouts, ¿podemos obtener una actualización sobre otra versión de servicio para 4.8?

Probé un proyecto con el mismo error, Xamarin 5.0.0.1539-pre2 y aún persiste

System.ObjectDisposedException: Cannot access a dropped object

Usando esta línea Forms.SetFlags ("UseLegacyRenderers") en el proyecto, la excepción tiene el ObjectName:
Xamarin.Forms.Platform.Android.AppCompat.FrameRenderer

Sin línea de bandera el ObjectName:
Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer

@TsplayerT ¿Puedes publicar el seguimiento de la pila completa?

Aquí está:

| Hilo principal | Detalles
| ------------------- | ------------------- |
| Java.Interop | JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) |
| Java.Interop | JniPeerMembers + JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue * parámetros) |
| Android.Views | View.set_Enabled (valor System.Boolean) |
| Xamarin.Forms.Platform.Android.FastRenderers | VisualElementRenderer.UpdateIsEnabled () |
| Xamarin.Forms.Platform.Android.FastRenderers | VisualElementRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) (envoltorio delegado-invocación.invoke_void_object_PropertyChangedEventArgs (objeto, System.ComponentModel.PropertyChangedEventArgs) |
| Xamarin.Forms | BindableObject.OnPropertyChanged (System.String propertyName) |
| Xamarin.Forms | Element.OnPropertyChanged (System.String propertyName) |
| Xamarin.Forms | BindableObject.SetValueActual (propiedad Xamarin.Forms.BindableProperty, contexto Xamarin.Forms.BindableObject + BindablePropertyContext, valor System.Object, System.Boolean currentApplying, atributos Xamarin.Forms.Internals.SetValueFlags, System.Boolean silencioso) |
| Xamarin.Forms | BindableObject.SetValueCore (propiedad Xamarin.Forms.BindableProperty, valor System.Object, atributos Xamarin.Forms.Internals.SetValueFlags, Xamarin.Forms.BindableObject + SetValuePrivateFlags privateAttributes) |
| Xamarin.Forms | BindingExpression.ApplyCore (System.Object sourceObject, destino Xamarin.Forms.BindableObject, propiedad Xamarin.Forms.BindableProperty, System.Boolean fromTarget) |
| Xamarin.Forms | BindingExpression.Apply (System.Boolean fromTarget) |
| Xamarin.Forms | BindingExpression + BindingExpressionPart.b__49_0 () |
| Java.Lang | Thread + RunnableImplementor.Run () |
| Java.Lang | IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) (método dinámico contenedor) Android.Runtime.DynamicMethodNameCounter.24 (intptr, intptr) |

Se adjuntan los detalles del error y otra información. report.txt

Esto debería reabrirse. También puedo reproducirlo en 5.0.0.1558-pre3.
Tenga en cuenta que tengo el siguiente caso: tengo un par de elementos (etiqueta incluida) dentro de un marco. Envolví el marco en mi propia clase: TestFrame. Allí, anulé el OnElementPropertyChanged. La excepción ocurre cuando obtengo un evento de cambio de propiedad para la propiedad "Y". Tenga en cuenta que, ocasionalmente, obtengo la excepción en el propio LabelRenderer, en lugar de en el marco. Supongo que el problema aún persiste, solo que en este caso aparece cuando tenemos un Frame. Aquí hay un seguimiento de la pila:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Test.Droid.Renderers.TestFrameRenderer'.
  at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <42748fcc36b74733af2d9940a8f3cc8e>:0 
  at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <42748fcc36b74733af2d9940a8f3cc8e>:0 
  at Android.Views.View.get_Context () [0x0000a] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 
  at Test.Droid.Renderers.TestFrameRenderer.UpdateFrame (Test.Views.Controls.TestFrame frameElement) [0x00001] in ...Test.Android\Renderers\TestFrameRenderer.cs:50 
  at Test.Droid.Renderers.TestFrameRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x0001f] in ...\Test.Android\Renderers\TestFrameRenderer.cs:44 
  at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:229 
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:362 
  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) [0x00114] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:464 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:400 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x00042] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:335 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindablePropertyKey propertyKey, System.Object value) [0x0000e] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:319 
  at Xamarin.Forms.VisualElement.set_Y (System.Double value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:556 
  at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x00050] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:408 
  at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:779 
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x001da] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:157 
  at Xamarin.Forms.Grid.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00144] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:49 
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:239 
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:203 
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:869 
  at Xamarin.Forms.Layout.ResolveLayoutChanges () [0x00069] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:374 
  at Xamarin.Forms.Platform.Android.Platform+DefaultRenderer.OnMeasure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x0000f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:1319 
  at Android.Views.View.n_OnMeasure_II (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00008] in <7d2292394f8c488b97f5bc2a0ac0240d>:0 
  at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.36(intptr,intptr,int,int)

@mduchev Me doy cuenta de que el nombre de la excepción es el mismo, pero este tipo de excepción es como una NullReferenceException. Cada uno es una causa diferente. El que estás teniendo no estará relacionado con este.

Si puede crear un nuevo problema con una reproducción, sería útil

@mduchev ¿Está viendo su excepción en 4.8?

@mduchev Noté que su excepción proviene de un renderizador personalizado

Si solo usa nuestro renderizador, ¿ve la misma excepción?

Es posible que deba verificar si su FrameRenderer se ha eliminado y no llamar a este código

at Test.Droid.Renderers.TestFrameRenderer.UpdateFrame (Test.Views.Controls.TestFrame frameElement) [0x00001] in ...Test.Android\Renderers\TestFrameRenderer.cs:50 
  at Test.Droid.Renderers.TestFrameRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x0001f] in ...\Test.Android\Renderers\TestFrameRenderer.cs:44 

@PureWeen Puede ser otro problema, no puedo asegurarlo. Veo ObjectDisposedException y, como dije, ocasionalmente, la excepción es ObjectDisposedException para FastRenderers.LabelRenderer (¡para el mismo flujo!).
Desafortunadamente, no puedo subir una reproducción. Intentaré crear uno y probarlo con el marco que envuelve la etiqueta.
Intenté con 4.8.0.1560 y la excepción está ahí. También lo he probado y confirmado con 4.7.0.1351 y 5.0.0.1558-pre3.

@mduchev o ¿alguien sabe por qué se lanzará la versión 5 de Xamarin diciendo que este problema se ha solucionado pero que sigue ocurriendo? No lo pude entender.

Incluso usando esta línea Forms.SetFlags (" UseLegacyRenderers ") en el proyecto, se produce una excepción con ObjectName:
Xamarin.Forms.Platform.Android.AppCompat.FrameRenderer

Sin línea para marcar, la excepción tiene este ObjectName:
Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer

@TsplayerT Creo que el problema que ambos estamos viendo (la excepción FrameRenderer) es un problema separado. El problema principal: el que tiene LabelRenderer puede estar solucionado, pero está ocurriendo un error similar con FrameRenderer. También noté la nueva excepción solo cuando estoy usando algo dentro de un marco. Desafortunadamente, no puedo identificar el diseño exacto y los pasos que bloquean la aplicación. Si puede, proporcione un proyecto de muestra y abra un nuevo problema para la excepción de marco.

@ZeProgFactory Gracias por la solución perfecta para personas como yo, que no pueden actualizar a la última versión de Xamarin, debido a muchos problemas, que aún están pendientes de agregarse a un sprint específico, incluso ...

¿Fue útil esta página
0 / 5 - 0 calificaciones