Xamarin.forms: System.ObjectDisposedException: Não é possível acessar um objeto descartado 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'

Criado em 20 mai. 2020  ·  73Comentários  ·  Fonte: xamarin/Xamarin.Forms

_Este problema foi removido de um tíquete na comunidade de desenvolvedores ._


Depois de atualizar para o Xamarin Forms 4.6.0726, começa a obter travamentos intermitentes frequentes no Android. Após investigação, descobri que isso está vindo do LabelRenderer de Xamarin

05-17 07: 27: 06.656 E / mono (5133):
05-17 07: 27: 06.656 E / mono (5133): Exceção não tratada:
05-17 07: 27: 06.656 E / mono (5133): System.ObjectDisposedException: Não é possível acessar um objeto descartado.
05-17 07: 27: 06.656 E / mono (5133): Nome do objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
05-17 07: 27: 06.656 E / mono (5133): at (método dinâmico do wrapper) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.656 E / mono (5133): at (wrapper nativo para gerenciado) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.656 E / mono-rt (5133): [ERROR] EXCEÇÃO FATAL NÃO MANIPULADA: System.ObjectDisposedException: Não é possível acessar um objeto descartado.
05-17 07: 27: 06.656 E / mono-rt (5133): Nome do objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
05-17 07: 27: 06.656 E / mono-rt (5133): at (método dinâmico do wrapper) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.656 E / mono-rt (5133): at (wrapper nativo para gerenciado) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.698 D / (5133): HostConnection :: get () Nova conexão de host estabelecida 0xbd1b1240, tid 5133

Não tenho certeza de onde está vindo. Eu tenho ListView como visualização principal e me pergunto se algo está errado com a versão mais recente do ListView, causando vazamento e travamento.

Não tenho um renderizador de rótulo personalizado, então ele deve vir do renderizador de plataforma do Xamarin
Por favor sugira.


Comentários Originais

Sistema de feedback do Visual Studio em 17/05/2020, 23:54:

Encaminhamos seus comentários para a equipe de engenharia apropriada para avaliação posterior. A equipe analisará o feedback e notificará você sobre as próximas etapas.


Soluções Originais

(sem soluções)

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

Comentários muito úteis

É completamente ridículo como a Microsoft pode esperar usar esta plataforma para criar qualquer aplicativo Enterprise com um defeito tão básico ainda aberto depois de tantas reclamações durante um período de tempo tão longo!

Não conseguimos lançar a atualização para a nossa versão Android do aplicativo nos últimos 4 meses e tudo o que recebemos deste tópico é que eles não podem reproduzir isso, quando o resto do mundo pode facilmente !!!

A Microsoft deve parar de fazer qualquer coisa antes que esse bug seja corrigido. Lançar qualquer versão mais recente do Xamarin é praticamente inútil !!!

Todos 73 comentários

Relacionado # 8262

Solução alternativa- https://github.com/xamarin/Xamarin.Forms/issues/8262#issuecomment -550022425

Construir um renderizador personalizado para um ListView ou suas células é uma abordagem para reduzir o efeito dos cálculos de layout no desempenho da rolagem.
Práticas recomendadas de ListView- https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/listview/performance

Tente implementar INotifyPropertyChanged (System.ComponentModel) para a classe que contém o ListView.
Defina o manipulador para public event PropertyChangedEventHandler PropertyChanged seguinte forma para definir o acessador da propriedade modificada-

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

Relacionado # 10159

Você pode anexar um pequeno projeto que demonstre esse problema? Obrigado!

Também estou enfrentando o mesmo problema de travar meu aplicativo

Rastreamento de pilha:

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)

O downgrade do XF para a versão 4.4.0.991864 resolveu o problema em nosso aplicativo de produção. Créditos: https://github.com/xamarin/Xamarin.Forms/issues/10159#issuecomment -633838442

Você pode anexar um pequeno projeto que demonstre esse problema? Obrigado!

@samhouts Não consigo publicar o código-fonte, é um aplicativo comercial ... e só funciona com dados.

Você pode anexar um pequeno projeto que demonstre esse problema? Obrigado!

@samhouts infelizmente não posso publicar o código por razões contratuais

Olá, estou apenas verificando se há algum cronograma de quando a correção estará disponível. Temos um grande lançamento sendo lançado e agora está em espera apenas por causa deste problema depois que atualizamos nosso framework Xamarin. Neste ponto, não podemos voltar à estrutura antiga também.

Por favor ajude.

Esses problemas são muito difíceis de resolver sem uma reprodução. Você pode contornar isso habilitando os renderizadores legados . Se você puder publicar um projeto de reprodução, talvez possamos resolver o problema completamente. Obrigado!

Esses problemas são muito difíceis de resolver sem uma reprodução. Você pode contornar isso habilitando os renderizadores legados . Se você puder publicar um projeto de reprodução, talvez possamos resolver o problema completamente. Obrigado!

Eu entendo, estou tentando reproduzir em um projeto de teste.

Esses problemas são muito difíceis de resolver sem uma reprodução. Você pode contornar isso habilitando os renderizadores legados. Se você puder publicar um projeto de reprodução, talvez possamos resolver o problema completamente. Obrigado!

@samhouts , tentei habilitar os renderizadores legados de acordo com as instruções fornecidas, porém, surpreendentemente, o erro ainda persiste!

Tentei limpar a solução, fechando / abrindo o VS mas o erro ainda persiste.

Por favor sugira. Qualquer ajuda nesse sentido seria extremamente útil!

Olá,

Tentando acompanhar para ver se há alguma atualização ou quando esperar atualizações sobre isso?

também experimentamos o problema, é muito difícil de reproduzir, o aplicativo trava aleatoriamente,
O problema começou a acontecer após a atualização do Xamarin do formulário 4.4 para o 4.6.0726.

Preciso mover isso para recurso bloqueado até que possamos obter uma reprodução.

@samhouts Isso se parece muito com # 10159 que é um problema muito sério. Você pode dar uma olhada nisso? Há comentários oferecendo amostra de reprodução.

Eu criei um repositório de amostra onde você pode ver esta exceção: https://github.com/nacompllo/CannotDisposeLabelRenderer

Também postei um vídeo mostrando como reproduzir o erro:
https://www.youtube.com/watch?v=yDhlI4BG8D8&feature=youtu.be

Descrição

Quando adiciono um binding à propriedade FontSize de um Label dentro de uma CollectionView e faço rotações com o dispositivo (em cada mudança de rotação eu atualizo o FontSize dos Labels de CollectionView).

System.ObjectDisposedException: 'Não é possível acessar um objeto descartado.
Nome do objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'. '

Passos para reproduzir

Adicione elementos ao Source do CollectionView enquanto faz rotações com o dispositivo.

Informação básica

  • Só tentei no Android, pois não tenho dispositivos Apple.
  • Xamarin.Forms 4.7.0.1239
  • Android 10

@samhouts Depois de fazer alguns testes na minha máquina com o repositório Xamarin.Forms segui o rastreamento do erro e acontece exatamente nesta linha da classe Platform.cs: https://github.com/xamarin/Xamarin.Forms /blob/29b92aa1fc2b9d834bb3b95cc224e07d0cc3e9b4/Xamarin.Forms.Platform.Android/Platform.cs#L1341

Eu envolvi o método em um try catch para obter o StackTrace e este é o resultado:
em Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] em: 0
em Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, parâmetros Java.Interop.JniArgumentValue *) [0x00000] em: 0
em Android.Views.View.get_Context () [0x00000] em /Users/builder/azdo/_work/204/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-29/mcw/Android .Views.View.cs: 5598
em Xamarin.Forms.Platform.Android.Platform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x0001c] em C: Users \ SourceReposXamarin.FormsXamarin.Forms.Platform.AndroidPlatform.Forms.Platform.cs 1343

Alguém tem solução pra isso ??

Estou enfrentando o mesmo erro no meu projeto. Tenho a versão 4.6.0.726 do Xamarin.Forms.
Rastreamento de pilha:

  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)

A janela de saída do aplicativo mostra estes resultados:

[mono] Exceção não tratada:
[mono] System.ObjectDisposedException: Não é possível acessar um objeto descartado.
[mono] Nome do objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
[mono] at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)
[mono] at (wrapper nativo para gerenciado) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Não é possível acessar um objeto descartado.
[mono-rt] Nome do objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
[mono-rt] at (método dinâmico do wrapper) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)

Posso reproduzir isso em nosso repo, tentei algo como:

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

Mas isso não funciona no mesmo problema.

Estou recebendo algo semelhante em 4.7.0.1179 ao navegar de volta de uma página que contém uma CollectionView para outra que contém uma 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)

Apenas algumas descobertas sobre este @samhouts :
Também vimos esse comportamento com CollectionView. Depois de passar algum tempo nisso, parece que pode ser devido aos eventos a seguir.

Nota: esta é uma teoria.

  1. OnViewRecycled é chamado em ItemsViewAdapter com um TemplatedItemViewHolder.
  2. TemplatedItemViewHolder.Recycle é chamado, o Xamarin.Forms.View associado ao TemplatedItemViewHolder é removido de ItemsView.
  3. O TemplatedItemViewHolder é enviado ao RecyclerView.RecycledViewPool.
  4. Nesse ínterim, algo descarta View / its children.
  5. O ViewHolder é religado e mostrado, gatilhos de layout ocorrem na visualização descartada e o aplicativo trava.

Eu contornei isso substituindo ItemsViewAdapter.OnViewRecycled e retornando para um TemplatedItemViewHolder. Em seguida, adicionei o código para remover o TemplatedItemViewHolder.View do ItemsView em OnBindViewHolder, antes de chamar a base.

Até agora, ninguém que tentou conseguir reproduzir o problema por mais tempo

@joshuangfraedom, você pode compartilhar seu código de amostra para a mudança do adaptador e verei se isso corrige para mim, por favor?

Algo assim @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);
            }
        }
}

Lendo SelectableItemsViewAdapter parece que o acima irá introduzir um vazamento de memória. Nós realmente precisamos que isso seja resolvido no nível do Forms para uma solução adequada (tudo é internalizado naquela classe).

Isso é um pouco mais robusto e eu acho que lida com todas as coisas selecionáveis ​​de acordo com @DuncWatts @samhouts anteriores. Ainda não sei o que exatamente é descartar os renderizadores do Cell.

Mas manter a referência no ItemsView parece evitar que seja limpo o suficiente.

    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);
                }
            }
        }
    }

Uma solução melhor para isso pode ser limpar a View em TemplatedItemViewHolder.Recycle e, em seguida, executar tudo no branch templateChanging novamente. Essa parece uma abordagem mais segura, mas exigiria a reimplementação de um monte de coisas se a mudança não fosse feita na base de código XF. Eu não acho que confiar que View e seus renderizadores serão preservados entre Recycle e Bind vai ser confiável.

Não posso reproduzir isso, mas a causa em nosso aplicativo foi uma vinculação disparando para a IU que estava em processo de descarte (removida da árvore visual).
Felizmente para nós, o modo de vinculação só precisava ser definido como OneTime para corrigir o problema.

Estou tendo o mesmo problema de travamento com o Xamarin.Forms 4.6.0.847.
Recebo este rastreamento de pilha de travamento quando mexo algumas vezes com o

@ Edgaras91 minha experiência também foi usando o syncfusion SfComboBox. Um elemento no ItemTemplate estava associando IsVisible a uma propriedade no viewmodel (IsSelected).
Quando uma nova seleção foi feita - o que fecha o menu suspenso da combobox, a redefinição das propriedades IsSelected dos modelos ItemSource vinculados estava causando o travamento.
Alterar o modo de vinculação para OneTime resolveu o problema.

@ Edgaras91 minha experiência também foi usando o syncfusion SfComboBox. Um elemento no ItemTemplate estava associando IsVisible a uma propriedade no viewmodel (IsSelected).
Quando uma nova seleção foi feita - o que fecha o menu suspenso da combobox, a redefinição das propriedades IsSelected dos modelos ItemSource vinculados estava causando o travamento.
Alterar o modo de vinculação para OneTime resolveu o problema.

Obrigado @InquisitorJax por isso, no entanto, alterar meu modelo de ligação DataSource para OneTime não resolveu meu problema de travamento.

Mais algumas informações sobre como reproduzir esta falha que podem ajudar outras pessoas:

Numa visão com SfComboBox e dados em seu DataSource tudo é estável.
Então, quando eu abrir um "pop-up" usando Rg.Plugins.Popup reutilizando o mesmo ViewModel que BindingContext e deixando-o aberto por 3 segundos e fechando este pop-up, alterando o valor no SfComboBox original 2 vezes selecionando no menu suspenso, irá lançar a exceção LabelRenderer.

O motivo pelo qual não estou postando no Syncfusion ainda é que a exceção é o Xamarin Forms puro. Ainda estou para tentar a solução alternativa de reversão da versão do Xamarin sugerida.

Posso confirmar, que para mim o XF 4.4.0.991864 NÃO corrigiu, ainda obtendo a mesma exceção.

Formulários 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)

Esse problema pode ser reproduzido em visualizações de coleção com modelos de item. Isso se tornou um bug crítico para nós.

Estamos tendo um seletor de modelo de exibição de coleção e os modelos consistem em componentes expansíveis e travamentos de aplicativos com a exceção abaixo ao clicar no ícone expansível.

Nota: a capacidade de expansão é alcançada simplesmente configurando false visível e configurando o tamanho da linha da grade pai como Auto.

Além do LabelRenderer, ele também dispara a exceção do ImageRenderer, quando não há rótulos na visualização expansível.

`09-10 20: 20: 28.104 E / AppCenterCrashes (23119): Exceção não tratada da fonte = AndroidEnvironment
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): System.ObjectDisposedException: Não é possível acessar um objeto descartado.
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): Nome do objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.ImageRenderer'.
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] em: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerMembers + JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, parâmetros Java.Interop.Jueni * em Java.Interop.Jueni *) *: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Android.Views.View.get_Context () [0x0000a] em <55654ebe9f2a48e6bade2862bb243f94>: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.Platform.Android.Platform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x00019] em D : a1sXamarin.Forms.Platform.AndroidPlatform.cs: 1341
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.Forms + AndroidPlatformServices.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x00000] em D: a1sXamarin .Forms.Platform.AndroidForms.cs: 921
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00025] em D: a1sXamarin.Forms.CoreVisualElement.cs: 854
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.Image.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] em D: a1sXamarin.Forms.CoreImage.cs: 74
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] em D: a1sXamarin.Forms.CoreVisualElement.cs: 837
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] em D: a1sXamarin.Forms.CoreVisualElement.cs: 713
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] em D: a1sXamarin.Forms .CoreVisualElement.cs: 771
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.Grid.CalculateAutoCells (System.Double width, System.Double height) [0x002a3] em D: a1sXamarin.Forms.CoreGridCalc.cs: 166
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) [0x0000c] em D: a1sXamarin.Forms.CoreGridCalc .cs: ​​576
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.Grid.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x0000e] em D: a1sXamarin.Forms.CoreGridCalc.cs: 18
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] em D: a1sXamarin.Forms.CoreLayout.cs: 266
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] em D: a1sXamarin.Forms.CoreLayout.cs: 224
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] em D: a1sXamarin.Forms.CoreVisualElement.cs: 859
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Xamarin.Forms.Layout.ResolveLayoutChanges () [0x0005c] em D: a1sXamarin.Forms.CoreLayout.cs: 392
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Java.Lang.Thread + RunnableImplementor.Run () [0x00008] em <55654ebe9f2a48e6bade2862bb243f94>: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): em Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] em <55654ebe9f2a48e6bade2862bb243f94>: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)

System.ObjectDisposedException: 'Não é possível acessar um objeto descartado.
Nome do objeto: 'Xamarin.Forms.Platform.Android.FastRenderers.ImageRenderer'. '`

É completamente ridículo como a Microsoft pode esperar usar esta plataforma para criar qualquer aplicativo Enterprise com um defeito tão básico ainda aberto depois de tantas reclamações durante um período de tempo tão longo!

Não conseguimos lançar a atualização para a nossa versão Android do aplicativo nos últimos 4 meses e tudo o que recebemos deste tópico é que eles não podem reproduzir isso, quando o resto do mundo pode facilmente !!!

A Microsoft deve parar de fazer qualquer coisa antes que esse bug seja corrigido. Lançar qualquer versão mais recente do Xamarin é praticamente inútil !!!

Minha solução alternativa para essa exceção (testar as versões do XF de 4.5.X a 4.8.X antes para ter certeza de que a mudança de versão não funciona):
POV: CarouselView (como modal) está mantendo rótulos com números (selecionando a quantidade do produto no carrinho). Este controle é mostrado apenas se o usuário deseja alterar a quantidade. Esta exceção foi disparada quando o carrouselview estava ocultando, mas ainda estava "conectado" à vinculação List <> e SelectedItem.
Solução: Preencher este controle em xaml.cs diretamente após o evento Clicked ser disparado. Desta forma, este controle não está conectado com a classe ViewModel / PageModel.
Esta solução é uma simulação de ligação:
`` `c #
// _counts é CarouselView
private void QuantityChangeTapped (objeto remetente, System.EventArgs e) // evento do botão
{
Item CartItem = (remetente como Visualização) .BindingContext como CartItem; // produto no carrinho que a quantidade vai mudar
_viewModel.Item = item; // definir quantidade já salva
_counts.ItemsSource = Enumerable.Range (1, item.QuantityRemaining) .ToList ();
_contas.Posição = item.Quantidade - 1; // rolar carrossel para a quantidade já salva
ShowSlider (); // mostrar carrossel
}
private void CountApprouveClicked (objeto remetente, System.EventArgs e) // evento do botão chamado "salvar quantidade selecionada"
{
CloseSlider ();
_viewModel.SelectedCount = (int) _counts.CurrentItem;
_viewModel.OnCountApprouve.Execute (null);
}

`` `

Encontrei este novamente - só que não havia nenhum controle Syncfusion envolvido.
Simplesmente um item em um DataTemplate que tinha uma ligação IsVisible com o ViewModel.
A solução foi a mesma: defina o BindingMode para OneTime.

Alguém que está vendo esse problema pode testar com o nuget aqui?

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

E então, por favor, deixe-me saber se você ainda vê a exceção.

Alguém que está vendo esse problema pode testar com o nuget aqui?

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

E então, por favor, deixe-me saber se você ainda vê a exceção.

Acabei de experimentar a pepita que você postou e uma exceção continua acontecendo, a única diferença da exceção anterior é que em vez de se referir a Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer agora a exceção se refere a Xamarin.Forms.Platform.Android. Platform + DefaultRenderer

Nova exceção:

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

Exceção antiga:

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

@nacompllo você pode postar o rastreamento de pilha inteiro? Eu percebo que provavelmente é apenas uma linha que é diferente, mas ainda seria útil ter o rastreamento completo aqui

@PureWeen eu testei o nuget e ele ainda travou, mas a pilha é um pouco 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
Anexo todas as informações que obtenho da janela de saída:

09-13 12: 37: 30.755 I / MonoDroid (21323): EXCEÇÃO NÃO MANUSEADA:
09-13 12: 37: 30.758 I / MonoDroid (21323): System.ObjectDisposedException: Não é possível acessar um objeto descartado.
09-13 12: 37: 30.759 I / MonoDroid (21323): Nome do objeto: 'Xamarin.Forms.Platform.Android.Platform + DefaultRenderer'.
09-13 12: 37: 30.759 I / MonoDroid (21323): at (método dinâmico do wrapper) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, bool, int, int, int, int)
09-13 12: 37: 30.759 I / MonoDroid (21323): at (wrapper nativo para gerenciado) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, int, int, int, int, int)
09-13 12: 37: 30.759 I / MonoDroid (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: 30.759 I / MonoDroid (21323): em Java.Interop.JniEnvironment + InstanceMethods.CallNonvirtualVoidMethod (instância Java.Interop.JniObjectReference, Java.Interop.JniObjectReference type, método Java.Interop.JniMetop .JniArgumentValue * args) [0x00079] em <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 30.759 I / MonoDroid (21323): em Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniDument * Parameters [0x000Value5] <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 30.759 I / MonoDroid (21323): em 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] em D: agent1sXamarin.Forms.Platform.Android.FormsViewGroupobjDebuggeneratedsrcXamarin.Forms.Platform.Android.FormsViewGroup.cs: 181
09-13 12: 37: 30.759 I / MonoDroid (21323): em Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () [0x0015c] em D: agent1sXamarin.Forms.Platform.AndroidVisualElementTracker.cs: 111
09-13 12: 37: 30.759 I / MonoDroid (21323): em Xamarin.Forms.Platform.Android.VisualElementRenderer`1 [TElement] .UpdateLayout () [0x00014] em D: agent1sXamarin.Forms.Platform.AndroidVisualElementRenderer.cs: 139
09-13 12: 37: 30.759 I / MonoDroid (21323): em Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout (System.Boolean alterado, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0002f] em D: agent1sXamarin.Forms.Platform.AndroidAppCompatPlatform.cs: 235
09-13 12: 37: 30.759 I / MonoDroid (21323): em Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (System.Boolean alterado, System.Int32 l, System.Int32 t, System.Int32 r, System. Int32 b) [0x0001d] em D: agent1sXamarin.Forms.Platform.AndroidPlatformRenderer.cs: 75
09-13 12: 37: 30.759 I / MonoDroid (21323): em Android.Views.ViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean alterado, System.Int32 l, System.Int32 t, System .Int32 r, System.Int32 b) [0x00008] em <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 30.759 I / MonoDroid (21323): at (método dinâmico do wrapper) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, bool, int, int, int, int)
System.ObjectDisposedException: 'Não é possível acessar um objeto descartado.
Nome do 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): Exceção não tratada:
09-13 12: 37: 33.822 E / mono (21323): System.ObjectDisposedException: Não é possível acessar um objeto descartado.
09-13 12: 37: 33.822 E / mono (21323): Nome do objeto: 'Xamarin.Forms.Platform.Android.Platform + DefaultRenderer'.
09-13 12: 37: 33.822 E / mono (21323): at (método dinâmico do wrapper) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, bool, int, int, int, int)
09-13 12: 37: 33.822 E / mono (21323): at (wrapper nativo para gerenciado) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, int, int, int, int, int)
09-13 12: 37: 33.822 E / mono (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.822 E / mono (21323): em Java.Interop.JniEnvironment + InstanceMethods.CallNonvirtualVoidMethod (instância Java.Interop.JniObjectReference, tipo Java.Interop.JniObjectReference, método Java.Interop.JniMetop .JniArgumentValue * args) [0x00079] em <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.822 E / mono (21323): em 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): em 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] em D: agent1sXamarin.Forms.Platform.Android.FormsViewGroupobjDebuggeneratedsrcXamarin.Forms.Platform.Android.FormsViewGroup.cs: 181
09-13 12: 37: 33.822 E / mono (21323): em Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () [0x0015c] em D: agent1sXamarin.Forms.Platform.AndroidVisualElementTracker.cs: 111
09-13 12: 37: 33.822 E / mono (21323): em 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] em D: agent1sXamarin.Forms.Platform .AndroidVisualElementRenderer.cs: 139
09-13 12: 37: 33.826 E / mono-rt (21323): em Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout (System.Boolean alterado, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0002f] em D: agent1sXamarin.Forms.Platform.AndroidAppCompatPlatform.cs: 235
09-13 12: 37: 33.826 E / mono-rt (21323): em Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (System.Boolean alterado, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0001d] em D: agent1sXamarin.Forms.Platform.AndroidPlatformRenderer.cs: 75
09-13 12: 37: 33.826 E / mono-rt (21323): em Android.Views.ViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean alterado, System.Int32 l, System.Int32 t , System.Int32 r, System.Int32 b) [0x00008] em <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): at (método dinâmico do wrapper) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, bool, int, int, int, int)
09-13 12: 37: 33.826 E / mono-rt (21323): --- Fim do rastreamento de pilha do local anterior onde a exceção foi lançada ---
09-13 12: 37: 33.826 E / mono-rt (21323):
09-13 12: 37: 33.826 E / mono-rt (21323): em Java.Interop.JniEnvironment + Strings.NewString (System.Char * unicodeChars, comprimento System.Int32) [0x0001e] em <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): em Java.Interop.JniEnvironment + Strings.NewString (valor System.String) [0x00024] em <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): em Android.Runtime.JNIEnv.NewString (System.String text) [0x00009] em <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): em Java.Lang.Error..ctor (mensagem System.String) [0x0001f] em <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): em Android.Runtime.JavaProxyThrowable..ctor (System.Exception innerException) [0x00007] em <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): em Java.Lang.Throwable.FromException (System.Exception e) [0x0001d] em <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): em Android.Runtime.AndroidEnvironment.UnhandledException (System.Exception e) [0x00067] em <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): at (método dinâmico do wrapper) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, bool, int, int, int, int) encerrando

09-13 12: 37: 33.826 E / mono-rt (21323): at (wrapper nativo para gerenciado) 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): Sinal fatal 6 (SIGABRT), código -1 (SI_QUEUE) no tid 21323 (ame.labelrender), pid 21323 (ame.labelrender)

@nacompllo @Reveon

Experimente este e me avise, por favor!

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

@PureWeen
Acabei de fazer o teste com o novo nuget e parece que o problema foi resolvido não se reproduz mais, parece que esse nuget resolve esse problema. Bom trabalho.

@PureWeen eu fiz um teste rápido e parece que as exceções se foram

@PureWeen também confirmo que, no momento, meu aplicativo não dispara essa exceção após testes rápidos.

Impressionante!!

@PureWeen , a exceção não ocorre mais com os nugets fornecidos. Lenda.

Alguém pode explicar como instalar este "nuget" no Xamarin Forms?

@ Edgaras91 dê uma olhada nisso

@ Edgaras91 ,
Clique no link.
À direita do painel "nuget" haverá o botão "mais" (3 pontos verticais), no menu de contexto selecione "baixar [...]".
Em seguida, defina (como @Reveon mencionado) a fonte local de nugets locais em seus arquivos de sistema (por exemplo, "C: reposlocalNugets") e coloque o conteúdo zip do zip baixado nesta pasta (haverá alguns arquivos .nupkg do Xamarin).
Então, no seu VS abra o gerenciador NuGet e a partir desta combobox
obraz
selecione sua fonte local (a minha é chamada apenas de "local")
Finalmente, basta instalar / atualizar o Xamarin.Forms para o projeto selecionado como de costume.

Obrigado @Reveon e @BartoszKopec . No entanto, também tenho integrações contínuas de Dev Ops, isso vai ser divertido ... Espero que esta correção seja aprovada e seja lançada o mais rápido possível!

@ Edgaras91 Estou usando o App Center como CI e tenho o mesmo problema - não consigo usá-lo! 😄

Também pode confirmar que isso parece estar resolvido.
@PureWeen nós sabemos o que o eta seria mais ou menos para qual lançamento está agendado?

  • ótimo trabalho acertando a causa btw;)

Oi,
Para as pessoas que têm este problema: no meu caso, tive vários rótulos que mudaram de visibilidade por meio de IsVisible .
Eu mudei para BackGroundColor e TextColor é Color.Transparent ou não, e o problema desapareceu…
Espero que isto ajude ...

Essa correção será incluída no próximo 4.8? Ou apenas 5.0?

Próximo SR de 4.8

A mesma exceção em 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

Não está nessa versão, você precisará aguardar os formulários do Xamarin 4.8 Service Release 3

Não está nessa versão, você precisará aguardar os formulários do Xamarin 4.8 Service Release 3

@joshuangfraedom Você quer dizer que esse problema foi corrigido no Xamarin forms 4.8 Service Release 3?

Quando está prevista a publicação? Quanto tempo esperar ... :-)))

Não tenho certeza, desculpe, parece que a correção para isso está atualmente no XF 5.0 Pré-lançamento 1, se você quiser tentar. @samhouts, podemos obter uma atualização sobre outro lançamento de serviço para 4.8?

Testei um projeto com o mesmo erro, Xamarin 5.0.0.1539-pre2 e ainda persiste

System.ObjectDisposedException: Cannot access a dropped object

Usando esta linha Forms.SetFlags ("UseLegacyRenderers") no projeto, a exceção tem o ObjectName:
Xamarin.Forms.Platform.Android.AppCompat.FrameRenderer

Sem linha de sinalização, o ObjectName:
Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer

@TsplayerT Você pode postar o rastreamento de pilha completo?

Aqui está:

| Tópico principal | Detalhes |
| ------------------- | ------------------- |
| Java.Interop | JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) |
| Java.Interop | JniPeerMembers + JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, parâmetros Java.Interop.JniArgumentValue *) |
| 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) (wrapper delegate-invoke.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 (propriedade Xamarin.Forms.BindableProperty, atributos silenciosos Xamarin.Forms.BindableObject + BindablePropertyContext, System.Object value, System.Boolean atualmenteApplying, Xamarin.Forms.Internals.SetValueFlags silenciosos, System.Boolean) |
| Xamarin.Forms | BindableObject.SetValueCore (propriedade Xamarin.Forms.BindableProperty, valor System.Object, atributos Xamarin.Forms.Internals.SetValueFlags, Xamarin.Forms.BindableObject + SetValuePrivateFlags privateAttributes) |
| Xamarin.Forms | BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty propriedade, 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 do wrapper) Android.Runtime.DynamicMethodNameCounter.24 (intptr, intptr) |

Os detalhes do erro e outras informações estão anexados. report.txt

Isso deve ser reaberto. Também posso reproduzi-lo em 5.0.0.1558-pre3.
Lembre-se de que tenho o seguinte caso - tenho alguns elementos (rótulo incl.) Dentro de um quadro. Eu envolvi o Frame em minha própria classe - TestFrame. Lá, eu substituí OnElementPropertyChanged. A exceção ocorre quando obtenho um evento de alteração de propriedade para a propriedade "Y". Lembre-se de que, ocasionalmente, recebo a exceção no próprio LabelRenderer, em vez de no Frame. Suponho que o problema ainda persiste, apenas neste caso ele aparece quando temos um Frame. Aqui está um rastreamento de pilha:

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 Sei que o nome da exceção é o mesmo, mas esse tipo de exceção é como uma NullReferenceException. Cada um é uma causa diferente. O que você está tendo não terá relação com este.

Se você puder criar um novo problema com uma reprodução, isso seria útil

@mduchev Você está vendo sua exceção no 4.8?

@mduchev Percebi que sua exceção vem de um renderizador personalizado

Se você apenas usar nosso renderizador, verá a mesma exceção?

Pode ser necessário verificar se o FrameRenderer foi descartado e não chamar 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 Pode ser outro problema, não posso dizer com certeza. Estou vendo ObjectDisposedException e, como disse, ocasionalmente, a exceção é ObjectDisposedException para FastRenderers.LabelRenderer (para o mesmo fluxo!).
Infelizmente, não posso enviar uma reprodução. Vou tentar criar um e testá-lo com o quadro envolvendo o rótulo.
Acabei de tentar com 4.8.0.1560 e a exceção está lá. Eu também testei e confirmei com 4.7.0.1351 e 5.0.0.1558-pre3.

@mduchev ou alguém sabe por que a versão 5 do Xamarin será lançada informando que o problema foi corrigido mas ainda está ocorrendo? Eu não conseguia entender.

Mesmo usando esta linha Forms.SetFlags (" UseLegacyRenderers ") no projeto, ocorre uma exceção com ObjectName:
Xamarin.Forms.Platform.Android.AppCompat.FrameRenderer

Sem linha para sinalizar, a exceção tem este ObjectName:
Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer

@TsplayerT Acho que o problema que estamos vendo (a exceção FrameRenderer) é um problema separado. O problema principal - aquele com o LabelRenderer pode realmente ser corrigido, mas um bug semelhante está acontecendo com o FrameRenderer. Também notei a nova exceção apenas quando estou usando algo dentro de um Frame. Infelizmente, não consigo identificar o layout e as etapas exatas que travam o aplicativo. Se você puder, forneça um projeto de amostra e abra um novo problema para a exceção de quadro.

@ZeProgFactory Obrigado pela solução alternativa perfeita para pessoas como eu, que não podem atualizar para a última versão do Xamarin, devido a muitos problemas, que ainda estão pendentes para serem adicionados a um sprint específico ...

Esta página foi útil?
0 / 5 - 0 avaliações

Questões relacionadas

simontocknell picture simontocknell  ·  3Comentários

xabre picture xabre  ·  3Comentários

joseluisct picture joseluisct  ·  3Comentários

rmarinho picture rmarinho  ·  3Comentários

MartinWegner picture MartinWegner  ·  3Comentários