Xamarin.forms: System.ObjectDisposedException: Zugriff auf ein entsorgtes Objekt 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer' nicht möglich

Erstellt am 20. Mai 2020  ·  73Kommentare  ·  Quelle: xamarin/Xamarin.Forms

_Dieses Problem wurde aus einem Ticket in der Entwickler-Community verschoben ._


Nach dem Upgrade auf Xamarin Forms 4.6.0726 kommt es unter Android häufig zu zeitweiligen Abstürzen. Bei einer Untersuchung wurde festgestellt, dass dies von Xamarins LabelRenderer stammt

05-17 07: 27: 06.656 E / Mono (5133):
05-17 07: 27: 06.656 E / Mono (5133): Nicht behandelte Ausnahme:
05-17 07: 27: 06.656 E / mono (5133): System.ObjectDisposedException: Kein Zugriff auf ein entsorgtes Objekt möglich.
05-17 07: 27: 06.656 E / mono (5133): Objektname: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
05-17 07: 27: 06.656 E / Mono (5133): at (Wrapper Dynamic-Methode) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.656 E / mono (5133): at (Wrapper nativ zu verwaltet) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.656 E / mono-rt (5133): [FEHLER] FATAL UNHANDLED AUSNAHME: System.ObjectDisposedException: Zugriff auf ein entsorgtes Objekt nicht möglich.
05-17 07: 27: 06.656 E / mono-rt (5133): Objektname: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
05-17 07: 27: 06.656 E / mono-rt (5133): at (dynamische Wrapper-Methode) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.656 E / mono-rt (5133): at (Wrapper nativ zu verwaltet) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.698 D / (5133): HostConnection :: get () Neue Hostverbindung hergestellt 0xbd1b1240, tid 5133

Ich bin mir nicht sicher, woher es kommt. Ich habe ListView als Hauptansicht und frage mich, ob etwas mit der neueren Version von ListView nicht stimmt, was zu Undichtigkeiten und Abstürzen führt.

Ich habe keinen benutzerdefinierten Label-Renderer, daher muss er vom Xamarin-Plattform-Renderer stammen
Bitte vorschlagen.


Ursprüngliche Kommentare

Visual Studio Feedback System am 17.05.2020, 23:54 Uhr:

Wir haben Ihr Feedback zur weiteren Bewertung an das entsprechende Engineering-Team weitergeleitet. Das Team überprüft das Feedback und benachrichtigt Sie über die nächsten Schritte.


Originelle Lösungen

(keine Lösungen)

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

Hilfreichster Kommentar

Es ist geradezu lächerlich, wie Microsoft damit rechnen kann, mit dieser Plattform eine Enterprise-App mit einem so grundlegenden Fehler zu erstellen, der nach so vielen Beschwerden über einen so langen Zeitraum immer noch offen ist!

Wir konnten in den letzten 4 Monaten kein Update für unsere Android-Version der App veröffentlichen und alles, was wir von diesem Thread erhalten, ist, dass sie dies nicht reproduzieren können, wenn der Rest der Welt dies leicht kann !!!

Microsoft sollte aufhören, alles zu tun, bevor dieser Fehler behoben werden kann. Die Veröffentlichung einer neueren Version von Xamarin ist ziemlich sinnlos !!!

Alle 73 Kommentare

Verwandte # 8262

Problemumgehung: https://github.com/xamarin/Xamarin.Forms/issues/8262#issuecomment -550022425

Das Erstellen eines benutzerdefinierten Renderers für eine ListView oder ihre Zellen ist ein Ansatz, um die Auswirkung von Layoutberechnungen auf die Bildlaufleistung zu verringern.
Best Practices für ListView - https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/listview/performance

Versuchen Sie, INotifyPropertyChanged (System.ComponentModel) für die Klasse zu implementieren, die die ListView enthält.
Stellen Sie den Handler für public event PropertyChangedEventHandler PropertyChanged wie folgt für den Set-Accessor der Eigenschaft modifiziert ein.

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

Verwandte # 10159

Können Sie bitte ein kleines Projekt anhängen, das dieses Problem demonstriert? Vielen Dank!

Ich habe auch das gleiche Problem beim Absturz meiner App

Stapelverfolgung:

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)

Ein Downgrade von XF auf Version 4.4.0.991864 löste das Problem in unserer Produktions-App. Credits: https://github.com/xamarin/Xamarin.Forms/issues/10159#issuecomment -633838442

Können Sie bitte ein kleines Projekt anhängen, das dieses Problem demonstriert? Vielen Dank!

@samhouts Ich kann den Quellcode nicht veröffentlichen, es ist eine kommerzielle Anwendung ... und es kann nur mit Daten arbeiten.

Können Sie bitte ein kleines Projekt anhängen, das dieses Problem demonstriert? Vielen Dank!

@samhouts Leider kann ich den Code aus vertraglichen Gründen nicht veröffentlichen

Hallo, ich überprüfe nur, ob es Zeitpläne gibt, bis wann das Update verfügbar sein würde. Wir haben eine Hauptversion herausgebracht und werden jetzt nur wegen dieses Problems angehalten, nachdem wir unser Xamarin-Framework aktualisiert haben. An dieser Stelle können wir auch nicht zum alten Framework zurückkehren.

Bitte helfen Sie.

Diese Probleme sind ohne Reproduktion sehr schwer zu lösen. Möglicherweise können Sie dies umgehen, indem Sie die älteren Renderer aktivieren . Wenn Sie ein Reproduktionsprojekt veröffentlichen können, können wir das Problem möglicherweise vollständig beheben. Vielen Dank!

Diese Probleme sind ohne Reproduktion sehr schwer zu lösen. Möglicherweise können Sie dies umgehen, indem Sie die älteren Renderer aktivieren . Wenn Sie ein Reproduktionsprojekt veröffentlichen können, können wir das Problem möglicherweise vollständig beheben. Vielen Dank!

Ich verstehe, ich versuche, auf einem Testprojekt zu reproduzieren.

Diese Probleme sind ohne Reproduktion sehr schwer zu lösen. Möglicherweise können Sie dies umgehen, indem Sie die älteren Renderer aktivieren. Wenn Sie ein Reproduktionsprojekt veröffentlichen können, können wir das Problem möglicherweise vollständig beheben. Vielen Dank!

@samhouts , ich habe versucht, die Legacy-Renderer gemäß den bereitgestellten Anweisungen zu

Ich habe versucht, die Lösung zu reinigen, VS zu schließen / zu öffnen, aber der Fehler bleibt bestehen.

Bitte vorschlagen. Jede Hilfe in dieser Hinsicht wäre immens hilfreich!

Hallo,

Versuchen Sie zu verfolgen, ob es noch Updates gibt oder wann Updates zu erwarten sind?

Wir haben auch das Problem, es ist wirklich schwer zu reproduzieren, die App stürzt zufällig ab,
Das Problem trat nach dem Upgrade von Xamarin Form 4.4 auf 4.6.0726 auf.

Ich muss dies auf eine blockierte Ressource verschieben, bis wir eine Reproduktion erhalten können.

@samhouts Dies sieht # 10159 sehr ähnlich, was ein ziemlich ernstes Problem ist. Können Sie es sich bitte ansehen? Es gibt einen Kommentar , der ein Repro-Beispiel anbietet.

Ich habe ein Beispiel-Repository erstellt, in dem diese Ausnahme angezeigt wird :

Ich habe auch ein Video gepostet, das zeigt, wie der Fehler reproduziert wird:
https://www.youtube.com/watch?v=yDhlI4BG8D8&feature=youtu.be

Beschreibung

Wenn ich der FontSize-Eigenschaft eines Etiketts in einer CollectionView eine Bindung hinzufüge und mit dem Gerät Rotationen vornehme (bei jeder Rotationsänderung aktualisiere ich die FontSize der Etiketten der CollectionView).

System.ObjectDisposedException: 'Kein Zugriff auf ein entsorgtes Objekt möglich.
Objektname: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'. '

Schritte zum Reproduzieren

Fügen Sie der Quelle der Sammlungsansicht Elemente hinzu, während Sie mit dem Gerät Drehungen vornehmen.

Grundinformation

  • Ich habe es nur auf Android versucht, da ich keine Apple-Geräte habe.
  • Xamarin.Forms 4.7.0.1239
  • Android 10

@samhouts Nachdem ich einige Tests auf meinem Computer mit dem Xamarin.Forms-Repository durchgeführt habe, bin ich der Spur des Fehlers gefolgt und dies geschieht genau in dieser Zeile der Platform.cs-Klasse: https://github.com/xamarin/Xamarin.Forms /blob/29b92aa1fc2b9d834bb3b95cc224e07d0cc3e9b4/Xamarin.Forms.Platform.Android/Platform.cs#L1341

Ich habe die Methode in einen Try-Catch eingeschlossen, um die StackTrace zu erhalten, und dies ist das Ergebnis:
bei Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in: 0
at Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue * -Parameter) in [0x00000] in: 0
unter 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-Ansicht, System.Double widthConstraint, System.Double heightConstraint) [0x0001c] in C: Users \ SourceReposXamarin.FormsXamarin.Forms.Pats.Pats.Pats.Pat.Pats.Pats.Pat.Pat.l 1343

Hat jemand die Lösung dafür?

Ich habe den gleichen Fehler in meinem Projekt. Ich habe Xamarin.Forms 4.6.0.726 Version.
Stapelspur:

  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)

Das Anwendungsausgabefenster zeigt diese Ausgabe:

[mono] Unbehandelte Ausnahme:
[mono] System.ObjectDisposedException: Auf ein entsorgtes Objekt kann nicht zugegriffen werden.
[mono] Objektname: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
[mono] at (Wrapper Dynamic-Methode) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)
[mono] at (Wrapper nativ zu verwaltet) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Zugriff auf ein entsorgtes Objekt nicht möglich.
[mono-rt] Objektname: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
[mono-rt] bei (Wrapper Dynamic-Methode) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)

Ich kann das in unserem Repo reproduzieren, ich habe so etwas versucht wie:

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

Aber das funktioniert nicht gleich.

Ich erhalte in 4.7.0.1179 etwas Ähnliches, wenn ich von einer Seite mit einer CollectionView zu einer anderen Seite mit einer CollectionView zurück navigiere:

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)

Nur einige Erkenntnisse rund um diese @samhouts :
Wir haben dieses Verhalten auch bei CollectionView beobachtet. Nachdem Sie einige Zeit damit verbracht haben, sieht es so aus, als ob dies an den folgenden Ereignissen liegen könnte.

Hinweis: Dies ist eine Theorie.

  1. OnViewRecycled wird in ItemsViewAdapter mit einem TemplatedItemViewHolder aufgerufen.
  2. TemplatedItemViewHolder.Recycle wird aufgerufen. Die dem TemplatedItemViewHolder zugeordnete Xamarin.Forms.View wird aus der ItemsView entfernt.
  3. Der TemplatedItemViewHolder wird in den RecyclerView.RecycledViewPool verschoben.
  4. In der Zwischenzeit verfügt etwas über die Ansicht / ihre Kinder.
  5. Der ViewHolder wird neu gebunden und angezeigt, Layout-Trigger treten in der bereitgestellten Ansicht auf und die App stürzt ab.

Ich habe dies umgangen, indem ich ItemsViewAdapter.OnViewRecycled überschrieben und für einen TemplatedItemViewHolder zurückgekehrt bin. Dann habe ich Code hinzugefügt, um TemplatedItemViewHolder.View aus der ItemsView in OnBindViewHolder zu entfernen, bevor ich base aufrufe.

Bisher konnte niemand, der es versucht hat, das Problem mehr reproduzieren

@joshuangfraedom Können Sie Ihren Beispielcode für den

So etwas wie dieses @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);
            }
        }
}

Wenn Sie SelectableItemsViewAdapter lesen, sieht es so aus, als würde das oben Gesagte einen Speicherverlust verursachen. Wir müssen dies wirklich auf Formularebene lösen, um eine ordnungsgemäße Lösung zu finden (alles ist in dieser Klasse verinnerlicht).

Dies ist etwas robuster und ich denke, dass alle auswählbaren Dinge gemäß den vorherigen

Das Behalten der Referenz in der ItemsView scheint jedoch zu verhindern, dass sie gut genug bereinigt wird.

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

Eine bessere Lösung hierfür könnte sogar darin bestehen, die Ansicht auf TemplatedItemViewHolder.Recycle zu löschen und dann alles im Zweig templateChanging erneut auszuführen. Das scheint ein sicherer Ansatz zu sein, würde aber eine Neuimplementierung einer Reihe von Dingen erfordern, wenn die Änderung nicht in der XF-Codebasis vorgenommen wird. Ich glaube nicht, dass das Vertrauen, dass die Ansicht und ihre Renderer zwischen Recycle und Bind erhalten bleiben, zuverlässig ist.

Ich kann dies nicht wiederholen, aber die Ursache in unserer App war ein verbindliches Auslösen der Benutzeroberfläche, die gerade entsorgt wurde (aus dem visuellen Baum entfernt).
Zum Glück musste der Bindungsmodus nur auf OneTime eingestellt werden, um das Problem zu beheben.

Ich habe das gleiche Absturzproblem mit Xamarin.Forms 4.6.0.847.
Ich erhalte diesen Absturzstapel-Trace, wenn ich ein paar Mal mit der SfComboBox (v18.2.0.44) von Syncfusion herumspiele . Ich denke, Label stürzt ab.

@ Edgaras91 Meine Erfahrung war auch mit der Syncfusion SfComboBox. Ein Element in der ItemTemplate hat IsVisible an eine Eigenschaft im Ansichtsmodell (IsSelected) gebunden.
Wenn eine neue Auswahl getroffen wurde, die das Dropdown-Menü der Combobox schließt, verursachte das Zurücksetzen der IsSelected-Eigenschaften der gebundenen ItemSource-Modelle den Absturz.
Durch Ändern des Bindungsmodus auf OneTime wurde das Problem behoben.

@ Edgaras91 Meine Erfahrung war auch mit der Syncfusion SfComboBox. Ein Element in der ItemTemplate hat IsVisible an eine Eigenschaft im Ansichtsmodell (IsSelected) gebunden.
Wenn eine neue Auswahl getroffen wurde, die das Dropdown-Menü der Combobox schließt, verursachte das Zurücksetzen der IsSelected-Eigenschaften der gebundenen ItemSource-Modelle den Absturz.
Durch Ändern des Bindungsmodus auf OneTime wurde das Problem behoben.

Vielen Dank an @InquisitorJax dafür. Durch die Änderung meines DataSource-Bindungsmodells in OneTime konnte mein Absturzproblem jedoch nicht behoben werden.

Weitere Informationen zum Reproduzieren dieses Absturzes, die anderen helfen könnten:

In einer Ansicht mit SfComboBox und Daten in seiner DataSource ist alles stabil.
Wenn ich dann ein "Popup" mit Rg.Plugins.Popup öffne , das dasselbe ViewModel wie BindingContext wiederverwendet und es 3 Sekunden lang offen lässt und dieses Popup schließt, dann den Wert auf der ursprünglichen SfComboBox 2 Mal durch Auswahl aus der Dropdown-Liste ändert, wird geworfen die LabelRenderer-Ausnahme.

Der Grund, warum ich noch nicht auf Syncfusion poste, ist, dass die Ausnahme reine Xamarin-Formen sind. Ich muss noch die vorgeschlagene Problemumgehung für die Rollback-Version der Xamarin-Version ausprobieren.

Ich kann bestätigen, dass XF 4.4.0.991864 es für mich NICHT behoben hat und immer noch die gleiche Ausnahme erhält.

Xamarin Forms 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)

Dieses Problem ist in Sammlungsansichten mit Elementvorlagen reproduzierbar. Dies ist für uns zu einem kritischen Fehler geworden.

Wir haben eine Vorlagenauswahl für Sammlungsansichten und Vorlagen bestehen aus erweiterbaren Komponenten und App stürzt mit der folgenden Ausnahme ab, wenn Sie auf das erweiterbare Symbol klicken.

Hinweis: Die Erweiterungsfähigkeit wird einfach dadurch erreicht, dass sichtbar falsch und die Zeilengröße des übergeordneten Rasters auf Auto gesetzt werden.

Nicht nur LabelRenderer, sondern auch eine ImageRenderer-Ausnahme, wenn in der erweiterbaren Ansicht keine Beschriftungen vorhanden sind.

09-10 20: 20: 28.104 E / AppCenterCrashes (23119): Nicht behandelte Ausnahme von source = AndroidEnvironment
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): System.ObjectDisposedException: Zugriff auf ein verfügbares Objekt nicht möglich.
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): Objektname: 'Xamarin.Forms.Platform.Android.FastRenderers.ImageRenderer'.
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): bei Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): bei Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.ni): 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): unter Android.Views.View.get_Context () [0x0000a] in <55654ebe9f2a48e6bade2862bb243f94>: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): bei Xamarin.Forms.Platform.Android.Platform.GetNativeSize (Ansicht Xamarin.Forms.VisualElement, System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D. : a1sXamarin.Forms.Platform.AndroidPlatform.cs: 1341
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): bei Xamarin.Forms.Forms + AndroidPlatformServices.GetNativeSize (Ansicht Xamarin.Forms.VisualElement, System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D: a1 .Forms.Platform.AndroidForms.cs: 921
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): at Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00025] in D: a1sXamarin.Forms.CoreVisualElement.cs:
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): at Xamarin.Forms.Image.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D: a1sXamarin.Forms.CoreImage.cs: 74
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D: a1sXamarin.Forms.CoreVisualElement.cs: 837
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D: a1sXamarin.Forms.CoreVisualElement.cs: 13
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags-Flags) [0x00054] in D: a1sXamarin.Form .CoreVisualElement.cs: 771
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): bei Xamarin.Forms.Grid.CalculateAutoCells (System.Double-Breite, System.Double-Höhe) [0x002a3] in D: a1sXamarin.Forms.CoreGridCalc.cs: 166
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): at Xamarin.Forms.Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) [0x0000c] in D: a1sXamarin.Forms.CoreGridCalc .cs: ​​576
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): bei Xamarin.Forms.Grid.LayoutChildren (System.Double x, System.Double y, System.Double Breite, System.Double Höhe) [0x0000e] in D: a1sXamarin.Forms.CoreGridCalc.cs: 18
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): bei Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D: a1sXamarin.Forms.CoreLayout.cs: 266
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D: a1sXamarin.Forms.CoreLayout.cs: 224
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D: a1sXamarin.Forms.CoreVisualElement.cs: 859
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): bei Xamarin.Forms.Layout.ResolveLayoutChanges () [0x0005c] in D: a1sXamarin.Forms.CoreLayout.cs: 392
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): bei Java.Lang.Thread + RunnableImplementor.Run () [0x00008] in <55654ebe9f2a48e6bade2862bb243f94>: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <55654ebe9f2a48e6bade2862bb243f94>: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): at (Wrapper Dynamic-Methode) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)

System.ObjectDisposedException: 'Kein Zugriff auf ein entsorgtes Objekt möglich.
Objektname: 'Xamarin.Forms.Platform.Android.FastRenderers.ImageRenderer'. '`

Es ist geradezu lächerlich, wie Microsoft damit rechnen kann, mit dieser Plattform eine Enterprise-App mit einem so grundlegenden Fehler zu erstellen, der nach so vielen Beschwerden über einen so langen Zeitraum immer noch offen ist!

Wir konnten in den letzten 4 Monaten kein Update für unsere Android-Version der App veröffentlichen und alles, was wir von diesem Thread erhalten, ist, dass sie dies nicht reproduzieren können, wenn der Rest der Welt dies leicht kann !!!

Microsoft sollte aufhören, alles zu tun, bevor dieser Fehler behoben werden kann. Die Veröffentlichung einer neueren Version von Xamarin ist ziemlich sinnlos !!!

Meine Problemumgehung für diese Ausnahme (Testen von XF-Versionen von 4.5.X auf 4.8.X, um sicherzustellen, dass die Versionsänderung nicht funktioniert):
POV: CarouselView (als Modal) führt Etiketten mit Nummern (Auswahl der Produktmenge im Warenkorb). Dieses Steuerelement wird nur angezeigt, wenn der Benutzer die Menge ändern möchte. Diese Ausnahme wurde ausgelöst, als sich die Karussellansicht versteckte, aber immer noch mit der Bindung von List <> und SelectedItem "verbunden" war.
Lösung: Füllen Sie dieses Steuerelement in xaml.cs direkt nach dem Auslösen des Clicked-Ereignisses. Auf diese Weise ist dieses Steuerelement nicht mit der ViewModel / PageModel-Klasse verbunden.
Diese Lösung ist eine Simulation der Bindung:
`` `c #
// _counts ist CarouselView
private void QuantityChangeTapped (Objektabsender, System.EventArgs e) // Ereignis der Schaltfläche
{
CartItem item = (Absender als Ansicht) .BindingContext als CartItem; // Produkt im Warenkorb, dessen Menge sich ändern wird
_viewModel.Item = item; // bereits gespeicherte Menge einstellen
_counts.ItemsSource = Enumerable.Range (1, item.QuantityRemaining) .ToList ();
_counts.Position = item.Quantity - 1; // Karussell zur bereits gespeicherten Menge scrollen
ShowSlider (); // Karussell zeigen
}}
private void CountApprouveClicked (Objektabsender, System.EventArgs e) // Ereignis der Schaltfläche "Ausgewählte Menge speichern"
{
CloseSlider ();
_viewModel.SelectedCount = (int) _counts.CurrentItem;
_viewModel.OnCountApprouve.Execute (null);
}}

`` `

Ich bin wieder auf dieses Problem gestoßen - nur dass keine Syncfusion-Steuerelemente beteiligt waren.
Einfach ein Element in einer DataTemplate, das eine IsVisible-Bindung zum ViewModel hatte.
Die Lösung war jedoch dieselbe: Setzen Sie den BindingMode auf OneTime.

Kann jemand, der dieses Problem sieht, hier mit dem Nuget testen?

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

Und dann lassen Sie es mich bitte wissen, wenn Sie die Ausnahme noch sehen?

Kann jemand, der dieses Problem sieht, hier mit dem Nuget testen?

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

Und dann lassen Sie es mich bitte wissen, wenn Sie die Ausnahme noch sehen?

Ich habe gerade das von Ihnen gepostete Nugget ausprobiert und es tritt immer wieder eine Ausnahme auf. Der einzige Unterschied zur vorherigen Ausnahme besteht darin, dass anstelle von Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer die Ausnahme jetzt auf Xamarin.Forms.Platform.Android verweist. Plattform + DefaultRenderer

Neue Ausnahme:

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

Alte Ausnahme:

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

@nacompllo kannst du den ganzen Stacktrace posten? Mir ist klar, dass es wahrscheinlich nur die eine Zeile ist, die anders ist, aber es wäre trotzdem nützlich, hier die vollständige Spur zu haben

@PureWeen Ich habe das Nuget getestet und es stürzt immer noch ab, aber der Stack ist ein bisschen anders

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
Ich füge alle Informationen hinzu, die ich aus dem Ausgabefenster erhalte:

09-13 12: 37: 30.755 I / MonoDroid (21323): UNBEHANDELTE AUSNAHME:
09-13 12: 37: 30.758 I / MonoDroid (21323): System.ObjectDisposedException: Zugriff auf ein entsorgtes Objekt nicht möglich.
09-13 12: 37: 30.759 I / MonoDroid (21323): Objektname: 'Xamarin.Forms.Platform.Android.Platform + DefaultRenderer'.
09-13 12: 37: 30.759 I / MonoDroid (21323): at (dynamische Wrapper-Methode) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, bool, int, int, int, int)
09-13 12: 37: 30.759 I / MonoDroid (21323): at (Wrapper nativ zu verwaltet) 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): bei Java.Interop.JniEnvironment + InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference-Instanz, Java.Interop.JniObjectReference-Typ, Java.Interop.JniMethod .JniArgumentValue * args) [0x00079] in <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 30.759 I / MonoDroid (21323): bei Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumental) <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 30.759 I / MonoDroid (21323): bei 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: agent1sXamarin.Forms.Platform.Android.FormsViewGroupobjDebuggeneratedsrcXamarin.Forms.Platform.Android.FormsViewGroup.cs: 181
09-13 12: 37: 30.759 I / MonoDroid (21323): bei Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () [0x0015c] in D: agent1sXamarin.Forms.Platform.AndroidVisualElementTracker.cs: 111
09-13 12: 37: 30.759 I / MonoDroid (21323): bei Xamarin.Forms.Platform.Android.VisualElementRenderer`1 [TElement] .UpdateLayout () [0x00014] in D: agent1sXamarin.Forms.Platform.AndroidVisualElementRenderer.cs 139
09-13 12: 37: 30.759 I / MonoDroid (21323): bei Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout (System.Boolean geändert, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0002f] in D: agent1sXamarin.Forms.Platform.AndroidAppCompatPlatform.cs: 235
09-13 12: 37: 30.759 I / MonoDroid (21323): bei Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (System.Boolean geändert, System.Int32 l, System.Int32 t, System.Int32 r, System. Int32 b) [0x0001d] in D: agent1sXamarin.Forms.Platform.AndroidPlatformRenderer.cs: 75
09-13 12: 37: 30.759 I / MonoDroid (21323): bei Android.Views.ViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean geändert, System.Int32 l, System.Int32 t, System .Int32 r, System.Int32 b) [0x00008] in <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 30.759 I / MonoDroid (21323): at (dynamische Wrapper-Methode) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, bool, int, int, int, int)
System.ObjectDisposedException: 'Kein Zugriff auf ein entsorgtes Objekt möglich.
Objektname: 'Xamarin.Forms.Platform.Android.Platform + DefaultRenderer'. '

09-13 12: 37: 33.822 E / Mono (21323):
09-13 12: 37: 33.822 E / Mono (21323): Nicht behandelte Ausnahme:
09-13 12: 37: 33.822 E / mono (21323): System.ObjectDisposedException: Kein Zugriff auf ein entsorgtes Objekt möglich.
09-13 12: 37: 33.822 E / Mono (21323): Objektname: 'Xamarin.Forms.Platform.Android.Platform + DefaultRenderer'.
09-13 12: 37: 33.822 E / Mono (21323): at (dynamische Wrapper-Methode) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, bool, int, int, int, int)
09-13 12: 37: 33.822 E / Mono (21323): at (Wrapper nativ zu verwaltet) 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): at Java.Interop.JniEnvironment + InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference-Instanz, Java.Interop.JniObjectReference-Typ, Java.Interop.JniMethodInf .JniArgumentValue * args) [0x00079] in <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.822 E / mono (21323): bei Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue * <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.822 E / Mono (21323): bei 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: agent1sXamarin.Forms.Platform.Android.FormsViewGroupobjDebuggeneratedsrcXamarin.Forms.Platform.Android.FormsViewGroup.cs: 181
09-13 12: 37: 33.822 E / Mono (21323): bei Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () [0x0015c] in D: agent1sXamarin.Forms.Platform.AndroidVisualElementTracker.cs: 111
09-13 12: 37: 33.822 E / mono (21323): bei 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] in D: agent1sXamarin.Forms.Platform .AndroidVisualElementRenderer.cs: 139
09-13 12: 37: 33.826 E / mono-rt (21323): bei Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout (System.Boolean geändert, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0002f] in D: agent1sXamarin.Forms.Platform.AndroidAppCompatPlatform.cs: 235
09-13 12: 37: 33.826 E / mono-rt (21323): bei Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (System.Boolean geändert, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0001d] in D: agent1sXamarin.Forms.Platform.AndroidPlatformRenderer.cs: 75
09-13 12: 37: 33.826 E / mono-rt (21323): at Android.Views.ViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean geändert, System.Int32 l, System.Int32 t , System.Int32 r, System.Int32 b) [0x00008] in <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): at (dynamische Wrapper-Methode) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, bool, int, int, int, int)
09-13 12: 37: 33.826 E / mono-rt (21323): --- Ende der Stapelverfolgung von der vorherigen Position, an der die Ausnahme ausgelöst wurde ---
09-13 12: 37: 33.826 E / Mono-RT (21323):
09-13 12: 37: 33.826 E / mono-rt (21323): bei Java.Interop.JniEnvironment + Strings.NewString (System.Char * unicodeChars, System.Int32-Länge) [0x0001e] in <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): bei Java.Interop.JniEnvironment + Strings.NewString (System.String-Wert) [0x00024] in <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): at Android.Runtime.JNIEnv.NewString (System.String-Text) [0x00009] in <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): at Java.Lang.Error..ctor (System.String-Nachricht) [0x0001f] in <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): at Android.Runtime.JavaProxyThrowable..ctor (System.Exception innerException) [0x00007] in <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): bei Java.Lang.Throwable.FromException (System.Exception e) [0x0001d] in <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): bei Android.Runtime.AndroidEnvironment.UnhandledException (System.Exception e) [0x00067] in <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): at (Wrapper Dynamic-Methode) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, bool, int, int, int, int) wird beendet

09-13 12: 37: 33.826 E / mono-rt (21323): at (Wrapper nativ zu verwaltet) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, int, int, int, int, int)
09-13 12: 37: 33.865 E / libc ++ abi (21323): Beenden
09-13 12: 37: 33.866 F / libc (21323): Tödliches Signal 6 (SIGABRT), Code -1 (SI_QUEUE) in tid 21323 (ame.labelrender), pid 21323 (ame.labelrender)

@nacompllo @Reveon

Probieren Sie es aus und lassen Sie es mich bitte wissen!

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

@nacompllo @Reveon

Probieren Sie es aus und lassen Sie es mich bitte wissen!

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

@ PureWeen
Ich habe gerade den Test mit dem neuen Nuget durchgeführt und es scheint, dass das Problem gelöst wurde und sich nicht mehr reproduziert. Es scheint, dass dieses Nuget dieses Problem löst. Gute Arbeit.

@PureWeen Ich habe einen kurzen Test gemacht und es scheint, dass die Ausnahmen weg sind

@PureWeen Ich bestätige auch, dass meine App diese Ausnahme im Moment nach schnellen Tests nicht

Genial!!

@PureWeen , Ausnahme tritt bei bereitgestellten

Kann jemand erklären, wie dieses "Nuget" in Xamarin Forms installiert wird?

@ Edgaras91 einen Blick auf nehmen diese

@ Edgaras91 ,
Klick auf den Link.
Auf der rechten Seite des "Nuget" -Panels befindet sich die Schaltfläche "Mehr" (3 vertikale Punkte). Wählen Sie im Kontextmenü "Download [...]".
Stellen Sie dann (wie von
Öffnen Sie dann in Ihrem VS den NuGet-Manager und über diese Combobox
obraz
Wählen Sie Ihre lokale Quelle (meine heißt nur "lokal")
Zum Schluss installieren / aktualisieren Sie Xamarin.Forms wie gewohnt auf das ausgewählte Projekt.

Vielen Dank an @Reveon und @BartoszKopec . Ich habe jedoch auch kontinuierliche Dev Ops-Integrationen, dies wird Spaß machen. Ich hoffe, dies ist ein genehmigter Fix und wird so schnell wie möglich eingeführt!

@ Edgaras91 Ich verwende App Center als CI und habe das gleiche Problem - kann es nicht verwenden! 😄

Kann auch bestätigen, dass dies gelöst zu sein scheint.
@PureWeen wissen wir, wie die eta mehr oder weniger

  • tolle Arbeit übrigens die Ursache nageln;)

Hallo,
Für die Leute, die dieses Problem haben: In meinem Fall hatte ich mehrere Labels, die die Sichtbarkeit über IsVisible geändert haben.
Ich habe es für BackGroundColor geändert und TextColor ist Color.Transparent oder nicht, und das Problem ist verschwunden ...
Hoffe das hilft ...

Wird dieses Update in der nächsten Version 4.8 enthalten sein? Oder nur 5.0?

Nächste SR von 4.8

Dieselbe Ausnahme am 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

Es ist nicht in dieser Version enthalten. Sie müssen auf Xamarin Forms 4.8 Service Release 3 warten

Es ist nicht in dieser Version enthalten. Sie müssen auf Xamarin Forms 4.8 Service Release 3 warten

@joshuangfraedom Sie meinen, dass dieses Problem in Xamarin

Wann ist die Veröffentlichung geplant? Wie lange Warten ... :-)))

Ich bin mir nicht sicher, ob es mir leid tut. Es sieht so aus, als ob das Update derzeit in XF 5.0 Prerelease 1 enthalten ist, wenn Sie es versuchen wollten. @samhouts können wir ein Update für eine andere Service-Version für 4.8 erhalten?

Ich habe ein Projekt mit dem gleichen Fehler getestet, Xamarin 5.0.0.1539-pre2, und es bleibt bestehen

System.ObjectDisposedException: Cannot access a dropped object

Wenn Sie diese Zeile Forms.SetFlags ("UseLegacyRenderers") im Projekt verwenden, hat die Ausnahme den Objektnamen:
Xamarin.Forms.Platform.Android.AppCompat.FrameRenderer

Ohne Flag-Linie den ObjectName:
Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer

@TsplayerT Kannst du den vollständigen Stack-Trace posten?

Hier ist es:

| Hauptfaden | Details |
| ------------------- | ------------------- |
| Java.Interop | JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) |
| Java.Interop | JniPeerMembers + JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue * -Parameter) |
| Android.Views | View.set_Enabled (System.Boolean-Wert) |
| Xamarin.Forms.Platform.Android.FastRenderers | VisualElementRenderer.UpdateIsEnabled () |
| Xamarin.Forms.Platform.Android.FastRenderers | VisualElementRenderer.OnElementPropertyChanged (System.Object-Absender, System.ComponentModel.PropertyChangedEventArgs e) (Wrapper-Delegatenaufruf.invoke_void_object_PropertyChangedEventArgs (Objekt, System.ComponentModel.PropertyChangedEventArgs) |
| Xamarin.Forms | BindableObject.OnPropertyChanged (System.String propertyName) |
| Xamarin.Forms | Element.OnPropertyChanged (System.String propertyName) |
| Xamarin.Forms | BindableObject.SetValueActual (Xamarin.Forms.BindableProperty-Eigenschaft, Xamarin.Forms.BindableObject + BindablePropertyContext-Kontext, System.Object-Wert, System.Boolean aktuell zutreffend, Xamarin.Forms.Internals.SetValueFlags-Attribute)
| Xamarin.Forms | BindableObject.SetValueCore (Xamarin.Forms.BindableProperty-Eigenschaft, System.Object-Wert, Xamarin.Forms.Internals.SetValueFlags-Attribute, Xamarin.Forms.BindableObject + SetValuePrivateFlags privateAttributes) |
| Xamarin.Forms | BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject-Ziel, Xamarin.Forms.BindableProperty-Eigenschaft, 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) (dynamische Wrapper-Methode) Android.Runtime.DynamicMethodNameCounter.24 (intptr, intptr) |

Die Details des Fehlers und andere Informationen sind beigefügt. report.txt

Dies sollte wieder geöffnet werden. Ich kann es auch auf 5.0.0.1558-pre3 reproduzieren.
Denken Sie daran, dass ich den folgenden Fall habe - ich habe ein paar Elemente (Beschriftung inkl.) In einem Rahmen. Ich habe den Frame in meine eigene Klasse eingewickelt - TestFrame. Dort habe ich OnElementPropertyChanged überschrieben. Die Ausnahme tritt auf, wenn ich ein Ereignis zum Ändern der Eigenschaft für die Eigenschaft "Y" erhalte. Denken Sie daran, dass ich gelegentlich die Ausnahme im LabelRenderer selbst und nicht im Frame erhalte. Ich nehme an, dass das Problem weiterhin besteht. In diesem Fall wird es angezeigt, wenn wir einen Frame haben. Hier ist eine Stapelverfolgung:

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 Mir ist klar, dass der Ausnahmenname derselbe ist, aber diese Art von Ausnahme ähnelt einer NullReferenceException. Jeder ist eine andere Ursache. Der, den Sie haben, wird nicht mit diesem verwandt sein.

Wenn Sie ein neues Problem mit einem Repro erstellen können, wäre dies hilfreich

@mduchev Sehen Sie Ihre Ausnahme in 4.8?

@mduchev Ich habe festgestellt, dass Ihre Ausnahme von einem benutzerdefinierten Renderer stammt

Wenn Sie nur unseren Renderer verwenden, sehen Sie die gleiche Ausnahme?

Möglicherweise müssen Sie überprüfen, ob Ihr FrameRenderer entsorgt wurde, und diesen Code nicht aufrufen

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 Es kann ein anderes Problem sein, kann nicht sicher sagen. Ich sehe ObjectDisposedException und wie gesagt, gelegentlich ist die Ausnahme ObjectDisposedException für den FastRenderers.LabelRenderer (für denselben Ablauf!).
Leider kann ich keinen Repro hochladen. Ich werde versuchen, eine zu erstellen und sie mit dem Rahmen zu testen, der das Etikett umhüllt.
Ich habe es gerade mit 4.8.0.1560 versucht und die Ausnahme ist da. Ich habe es auch mit 4.7.0.1351 & 5.0.0.1558-pre3 getestet und bestätigt.

@mduchev oder weiß jemand, warum Version 5 von Xamarin veröffentlicht wird und sagt, dass dieses Problem behoben wurde, aber immer noch auftritt? Ich konnte es nicht verstehen.

Selbst wenn diese Zeile Forms.SetFlags (" UseLegacyRenderers ") im Projekt verwendet wird, tritt bei ObjectName eine Ausnahme auf:
Xamarin.Forms.Platform.Android.AppCompat.FrameRenderer

Ohne zu kennzeichnende Zeile hat die Ausnahme diesen Objektnamen:
Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer

@TsplayerT Ich denke, dass das Problem, das wir beide sehen (die FrameRenderer-Ausnahme), ein separates Problem ist. Das Hauptproblem - das mit dem LabelRenderer ist zwar behoben, aber ein ähnlicher Fehler tritt mit dem FrameRenderer auf. Ich habe die neue Ausnahme auch nur bemerkt, wenn ich etwas in einem Frame verwende. Leider kann ich das genaue Layout und die Schritte, die die App zum Absturz bringen, nicht genau bestimmen. Wenn Sie können, geben Sie bitte ein Beispielprojekt an und öffnen Sie ein neues Problem für die Rahmenausnahme.

@ZeProgFactory Vielen Dank für die perfekte Problemumgehung für Leute wie mich, die aufgrund vieler Probleme, die noch ausstehen, um einem bestimmten Sprint hinzugefügt zu werden, nicht auf die neueste Xamarin-Version aktualisiert werden können ...

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen