Xamarin.forms: System.ObjectDisposedException: Tidak dapat mengakses objek yang dibuang 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'

Dibuat pada 20 Mei 2020  ·  73Komentar  ·  Sumber: xamarin/Xamarin.Forms

_ Masalah ini telah dipindahkan dari tiket di Komunitas Pengembang ._


Setelah memutakhirkan ke Formulir Xamarin 4.6.0726, mulai sering terjadi kerusakan berselang di Android. Setelah diselidiki, ditemukan bahwa ini berasal dari LabelRenderer Xamarin

05-17 07: 27: 06.656 E / mono (5133):
05-17 07: 27: 06.656 E / mono (5133): Tidak Tertangani Pengecualian:
05-17 07: 27: 06.656 E / mono (5133): System.ObjectDisposedException: Tidak dapat mengakses objek yang dibuang.
05-17 07: 27: 06.656 E / mono (5133): Nama objek: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
05-17 07: 27: 06.656 E / mono (5133): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.656 E / mono (5133): di (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.656 E / mono-rt (5133): [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Tidak dapat mengakses objek yang dibuang.
05-17 07: 27: 06.656 E / mono-rt (5133): Nama objek: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
05-17 07: 27: 06.656 E / mono-rt (5133): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.656 E / mono-rt (5133): di (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.29 (intptr, intptr)
05-17 07: 27: 06.698 D / (5133): HostConnection :: get () Koneksi Host Baru dibuat 0xbd1b1240, tid 5133

Tidak yakin dari mana asalnya. Saya memiliki ListView sebagai tampilan utama dan bertanya-tanya ada sesuatu yang salah dengan versi ListView yang lebih baru yang menyebabkan kebocoran dan kerusakan.

Saya tidak memiliki penyaji label khusus sehingga harus berasal dari perender platform Xamarin
Mohon saran.


Komentar Asli

Sistem Umpan Balik Visual Studio pada 5/17/2020, 11:54 PM:

Kami telah mengarahkan umpan balik Anda ke tim teknik yang sesuai untuk evaluasi lebih lanjut. Tim akan meninjau masukan tersebut dan memberi tahu Anda tentang langkah selanjutnya.


Solusi Asli

(tidak ada solusi)

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

Komentar yang paling membantu

Sungguh konyol bahwa bagaimana Microsoft dapat berharap untuk menggunakan platform ini untuk membuat aplikasi Enterprise apa pun dengan cacat dasar seperti itu masih terbuka setelah begitu banyak keluhan dalam jangka waktu yang lama!

Kami belum dapat merilis pembaruan ke versi aplikasi Android kami selama 4 bulan terakhir dan yang kami dapatkan dari utas ini adalah mereka tidak dapat mereproduksi ini, ketika seluruh dunia dengan mudah bisa !!!

Microsoft harus berhenti melakukan apa saja sebelum bug ini dapat diperbaiki. Merilis versi Xamarin yang lebih baru tidak ada gunanya !!!

Semua 73 komentar

Terkait # 8262

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

Membangun perender khusus untuk ListView atau selnya adalah salah satu pendekatan untuk mengurangi efek penghitungan tata letak pada kinerja pengguliran.
Praktik terbaik ListView- https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/listview/performance

Coba terapkan INotifyPropertyChanged (System.ComponentModel) untuk kelas yang berisi ListView.
Setel penangan untuk public event PropertyChangedEventHandler PropertyChanged sebagai berikut untuk set accessor dari properti yang dimodifikasi-

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

Terkait # 10159

Bisakah Anda melampirkan proyek kecil yang menunjukkan masalah ini? Terima kasih!

Saya juga menghadapi masalah yang sama saat merusak aplikasi saya

Pelacakan Tumpukan:

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)

Menurunkan XF ke versi 4.4.0.991864 menyelesaikan masalah di aplikasi produksi kami. Penghargaan: https://github.com/xamarin/Xamarin.Forms/issues/10159#issuecomment -633838442

Bisakah Anda melampirkan proyek kecil yang menunjukkan masalah ini? Terima kasih!

@samhouts Saya tidak dapat mempublikasikan kode sumber, ini adalah aplikasi komersial ... dan hanya dapat bekerja dengan data.

Bisakah Anda melampirkan proyek kecil yang menunjukkan masalah ini? Terima kasih!

@samhouts sayangnya saya tidak dapat mempublikasikan kode karena alasan kontrak

Halo, hanya memeriksa apakah ada garis waktu kapan perbaikan akan tersedia. Kami memiliki rilis besar yang akan keluar dan sekarang ditahan hanya karena masalah ini setelah kami meningkatkan kerangka Xamarin kami. Pada titik ini kita tidak bisa kembali ke kerangka lama juga.

Tolong bantu.

Masalah ini sangat sulit diselesaikan tanpa reproduksi. Anda mungkin dapat mengatasinya dengan mengaktifkan perender lama . Jika Anda dapat memposting proyek reproduksi, kami mungkin dapat menyelesaikan masalah sepenuhnya. Terima kasih!

Masalah ini sangat sulit diselesaikan tanpa reproduksi. Anda mungkin dapat mengatasinya dengan mengaktifkan perender lama . Jika Anda dapat memposting proyek reproduksi, kami mungkin dapat menyelesaikan masalah sepenuhnya. Terima kasih!

Saya mengerti, saya mencoba mereproduksi pada proyek uji.

Masalah ini sangat sulit diselesaikan tanpa reproduksi. Anda mungkin dapat mengatasinya dengan mengaktifkan perender lama. Jika Anda dapat memposting proyek reproduksi, kami mungkin dapat menyelesaikan masalah sepenuhnya. Terima kasih!

@samhouts , saya mencoba mengaktifkan penyaji lama sesuai instruksi yang diberikan namun yang mengejutkan kesalahan masih berlanjut!

Saya mencoba membersihkan solusinya, menutup / membuka VS tetapi kesalahan masih berlanjut.

Mohon saran. Bantuan apa pun dalam hal ini akan sangat membantu!

Halo,

Mencoba menindaklanjuti untuk melihat apakah ada pembaruan atau kapan pembaruan ini diharapkan?

kami juga mengalami masalah ini, sangat sulit untuk mereproduksi, aplikasi mogok secara acak,
Masalah mulai terjadi setelah memutakhirkan dari Xamarin bentuk 4.4 ke 4.6.0726.

Saya perlu memindahkan ini ke sumber daya yang diblokir sampai kita bisa mendapatkan reproduksi.

@samhouts Ini terlihat sangat mirip dengan # 10159 yang merupakan masalah yang cukup serius. Bisakah Anda melihatnya? Ada komentar yang menawarkan contoh repro.

Saya telah membuat repositori contoh tempat Anda dapat melihat pengecualian ini: https://github.com/nacompllo/CannotDisposeLabelRenderer

Saya juga telah memposting video yang menunjukkan cara mereproduksi kesalahan:
https://www.youtube.com/watch?v=yDhlI4BG8D8&feature=youtu.be

Deskripsi

Ketika saya menambahkan pengikatan ke properti FontSize dari Label di dalam CollectionView dan membuat rotasi dengan perangkat (dalam setiap perubahan rotasi, saya memperbarui FontSize dari Label dari CollectionView).

System.ObjectDisposedException: 'Tidak dapat mengakses objek yang dibuang.
Nama objek: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'. '

Langkah-langkah untuk Mereproduksi

Tambahkan elemen ke Source of the CollectionView sambil membuat rotasi dengan perangkat.

Informasi dasar

  • Saya hanya mencobanya di Android karena saya tidak memiliki perangkat Apple.
  • Xamarin.Forms 4.7.0.1239
  • Android 10

@samhouts Setelah melakukan beberapa tes pada mesin saya dengan repositori Xamarin.Forms, saya telah mengikuti jejak kesalahan dan itu terjadi persis di baris kelas Platform.cs ini: https://github.com/xamarin/Xamarin.Forms /blob/29b92aa1fc2b9d834bb3b95cc224e07d0cc3e9b4/Xamarin.Forms.Platform.Android/Platform.cs#L1341

Saya telah membungkus metode dalam mencoba menangkap untuk mendapatkan StackTrace dan ini adalah hasilnya:
di Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] di: 0
di Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue * parameter) [0x00000] di: 0
di Android.Views.View.get_Context () [0x00000] di /Users/builder/azdo/_work/204/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-29/mcw/Android .Views.View.cs: 5598
di Xamarin.Forms.Platform.Android.Platform.GetNativeSize (tampilan Xamarin.Forms.VisualElement, System.Double widthConstraint, System.Double heightConstraint) [0x0001c] di C: Users \ SourceReposXamarin.FormsXamarin.Forms.Platform.AndroidPlatform.cs: 1343

Ada yang punya solusi untuk ini ??

Saya menghadapi kesalahan yang sama dalam proyek saya. Saya memiliki versi Xamarin.Forms 4.6.0.726.
Jejak tumpukan:

  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)

Jendela Keluaran Aplikasi menunjukkan keluaran ini:

[mono] Pengecualian Tidak Tertangani:
[mono] System.ObjectDisposedException: Tidak dapat mengakses objek yang dibuang.
[mono] Nama objek: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
[mono] di (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)
[mono] di (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Tidak dapat mengakses objek yang dibuang.
[mono-rt] Nama objek: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'.
[mono-rt] di (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)

Saya dapat mereproduksi ini di repo kami, saya memang mencoba sesuatu seperti:

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

Tapi itu tidak bekerja pada masalah yang sama.

Saya mendapatkan sesuatu yang serupa di 4.7.0.1179 saat menavigasi kembali dari halaman yang berisi CollectionView ke halaman lain yang berisi CollectionView:

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

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

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

Hanya beberapa temuan seputar @samhouts ini:
Kami juga melihat perilaku ini dengan CollectionView. Setelah menghabiskan beberapa waktu untuk itu, sepertinya hal itu mungkin terjadi karena kejadian berikut.

Catatan: Ini adalah teori.

  1. OnViewRecycled dipanggil di ItemsViewAdapter dengan TemplatedItemViewHolder.
  2. TemplatedItemViewHolder.Recycle dipanggil, Xamarin.Forms.View yang terkait dengan TemplatedItemViewHolder dihapus dari ItemsView.
  3. TemplatedItemViewHolder didorong ke RecyclerView.RecycledViewPool.
  4. Sesuatu membuang View / anak-anaknya sementara itu.
  5. ViewHolder terikat kembali dan ditampilkan, pemicu tata letak terjadi pada tampilan yang dibuang dan aplikasi macet.

Saya mengatasi ini dengan mengganti ItemsViewAdapter.OnViewRecycled dan mengembalikan untuk TemplatedItemViewHolder. Lalu saya menambahkan kode untuk menghapus TemplatedItemViewHolder.View dari ItemsView di OnBindViewHolder, sebelum memanggil basis.

Sejauh ini tidak ada yang mencoba dapat mereproduksi masalah tersebut lagi

@joshuangfraedom dapatkah Anda membagikan kode sampel untuk perubahan adaptor dan saya akan melihat apakah itu memperbaikinya untuk saya?

Sesuatu seperti ini @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);
            }
        }
}

Membaca SelectableItemsViewAdapter sepertinya di atas akan menyebabkan kebocoran memori. Kami benar-benar perlu ini diselesaikan pada tingkat Formulir untuk solusi yang tepat (semuanya diinternalisasi di kelas itu).

Ini sedikit lebih kuat dan saya pikir menangani semua hal yang dapat dipilih sesuai @DuncWatts @samhouts sebelumnya. Saya masih tidak tahu apa sebenarnya yang membuang penyaji Cell.

Tapi menyimpan referensi di ItemsView tampaknya mencegahnya dibersihkan dengan cukup baik.

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

Solusi yang lebih baik untuk ini bahkan mungkin menghapus View on TemplatedItemViewHolder.Recycle dan kemudian mengeksekusi semuanya di cabang templateChanging lagi. Itu sepertinya pendekatan yang lebih aman, tetapi akan membutuhkan penerapan ulang banyak hal jika perubahan tidak dilakukan dalam basis kode XF. Saya tidak berpikir mempercayai bahwa View dan perendernya akan dipertahankan antara Recycle dan Bind akan dapat diandalkan.

Saya tidak dapat melakukan repro ini, tetapi penyebabnya di aplikasi kami adalah pengikatan yang diaktifkan ke UI yang sedang dalam proses pembuangan (dihapus dari pohon visual).
Beruntung bagi kami, mode pengikatan hanya perlu disetel ke OneTime untuk memperbaiki masalah.

Saya mengalami masalah crash yang sama dengan Xamarin.Forms 4.6.0.847.
Saya mendapatkan jejak tumpukan kecelakaan ini ketika saya mengotak-atik beberapa kali dengan

@ Edgaras91 pengalaman saya juga menggunakan syncfusion SfComboBox. Sebuah elemen di ItemTemplate mengikat IsVisible ke properti di viewmodel (IsSelected).
Ketika pilihan baru dibuat - yang menutup dropdown combobox, reset properti IsSelected dari model ItemSource terikat menyebabkan crash.
Mengubah mode pengikatan ke OneTime menyelesaikan masalah.

@ Edgaras91 pengalaman saya juga menggunakan syncfusion SfComboBox. Sebuah elemen di ItemTemplate mengikat IsVisible ke properti di viewmodel (IsSelected).
Ketika pilihan baru dibuat - yang menutup dropdown combobox, reset properti IsSelected dari model ItemSource terikat menyebabkan crash.
Mengubah mode pengikatan ke OneTime menyelesaikan masalah.

Terima kasih @InquisitorJax untuk itu, bagaimanapun, mengubah model pengikatan DataSource saya ke OneTime, tidak menyelesaikan masalah crash saya.

Beberapa informasi lebih lanjut tentang cara mereproduksi crash ini yang mungkin membantu orang lain:

Dalam tampilan dengan SfComboBox dan data di DataSource semuanya stabil.
Kemudian ketika saya membuka "popup" menggunakan Rg.Plugins.Popup menggunakan kembali ViewModel yang sama sebagai BindingContext dan membiarkannya terbuka selama 3 detik dan menutup popup ini, kemudian mengubah nilai pada SfComboBox asli 2 kali dengan memilih dari drop down, akan melempar pengecualian LabelRenderer.

Alasan saya belum memposting ke Syncfusion adalah karena pengecualiannya adalah Formulir Xamarin murni. Saya belum mencoba solusi rollback versi Xamarin yang disarankan.

Saya dapat mengonfirmasi, bahwa bagi saya XF 4.4.0.991864 TIDAK memperbaikinya, masih mendapatkan pengecualian yang sama.

Formulir Xamarin 4.8.0.1364

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

Masalah ini dapat direkonstruksi dalam tampilan koleksi dengan templat item. Ini telah menjadi bug kritis bagi kami.

Kami memiliki pemilih template tampilan koleksi dan template yang terdiri dari komponen yang dapat diperluas dan aplikasi mogok dengan pengecualian di bawah ini setelah diklik pada ikon yang dapat diperluas.

Catatan: kemampuan perluasan dicapai hanya dengan menyetel tampak salah dan menyetel ukuran baris kisi induk ke Otomatis.

Tidak hanya LabelRenderer, ia juga mengaktifkan pengecualian ImageRenderer, saat tidak ada label dalam tampilan yang dapat diperluas.

`09-10 20: 20: 28.104 E / AppCenterCrashes (23119): Pengecualian Tidak Tertangani dari sumber = AndroidEnvironment
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): System.ObjectDisposedException: Tidak dapat mengakses objek yang dibuang.
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): Nama objek: 'Xamarin.Forms.Platform.Android.FastRenderers.ImageRenderer'.
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] di: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeNonvirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentxValue * parameter]: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Android.Views.View.get_Context () [0x0000a] di <55654ebe9f2a48e6bade2862bb243f94>: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.Platform.Android.Platform.GetNativeSize (tampilan Xamarin.Forms.VisualElement, System.Double widthConstraint, System.Double heightConstraint) [0x00019] di D : a1sXamarin.Forms.Platform.AndroidPlatform.cs: 1341
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.Forms + AndroidPlatformServices.GetNativeSize (tampilan Xamarin.Forms.VisualElement, System.Double widthConstraint, System.Double heightConstraint) [0x00000] di D: a1sXamarin .Forms.Platform.AndroidForms.cs: 921
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00025] di D: a1sXamarin.Forms.CoreVisualElement.cs: 854
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.Image.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] di D: a1sXamarin.Forms.CoreImage.cs: 74
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] di D: a1sXamarin.Forms.CoreVisualElement.cs: 837
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] di D: a1sXamarin.Forms.CoreVisualElement.cs: 713
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] di D: a1sXamarin.Forms .CoreVisualElement.cs: 771
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.Grid.CalculateAutoCells (System.Double width, System.Double height) [0x002a3] di D: a1sXamarin.Forms.CoreGridCalc.cs: 166
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) [0x0000c] di D: a1sXamarin.Forms.CoreGridCalc .cs: ​​576
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.Grid.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x0000e] di D: a1sXamarin.Forms.CoreGridCalc.cs: 18
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] di D: a1sXamarin.Forms.CoreLayout.cs: 266
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] di D: a1sXamarin.Forms.CoreLayout.cs: 224
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] di D: a1sXamarin.Forms.CoreVisualElement.cs: 859
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Xamarin.Forms.Layout.ResolveLayoutChanges () [0x0005c] di D: a1sXamarin.Forms.CoreLayout.cs: 392
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Java.Lang.Thread + RunnableImplementor.Run () [0x00008] di <55654ebe9f2a48e6bade2862bb243f94>: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] di <55654ebe9f2a48e6bade2862bb243f94>: 0
09-10 20: 20: 28.104 E / AppCenterCrashes (23119): di (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.1 (intptr, intptr)

System.ObjectDisposedException: 'Tidak dapat mengakses objek yang dibuang.
Nama objek: 'Xamarin.Forms.Platform.Android.FastRenderers.ImageRenderer'. ''

Sungguh konyol bahwa bagaimana Microsoft dapat berharap untuk menggunakan platform ini untuk membuat aplikasi Enterprise apa pun dengan cacat dasar seperti itu masih terbuka setelah begitu banyak keluhan dalam jangka waktu yang lama!

Kami belum dapat merilis pembaruan ke versi aplikasi Android kami selama 4 bulan terakhir dan yang kami dapatkan dari utas ini adalah mereka tidak dapat mereproduksi ini, ketika seluruh dunia dengan mudah bisa !!!

Microsoft harus berhenti melakukan apa saja sebelum bug ini dapat diperbaiki. Merilis versi Xamarin yang lebih baru tidak ada gunanya !!!

Solusi saya untuk pengecualian ini (menguji versi XF dari 4.5.X ke 4.8.X sebelumnya untuk memastikan perubahan versi tidak berfungsi):
POV: CarouselView (sebagai modal) menyimpan label dengan angka (memilih jumlah produk di keranjang). Kontrol ini hanya ditampilkan jika pengguna ingin mengubah kuantitas. Pengecualian ini diaktifkan saat carouselview bersembunyi, tetapi masih "terhubung" ke binding List <> dan SelectedItem.
Solusi: Mengisi kontrol ini di xaml.cs langsung setelah peristiwa Diklik diaktifkan. Dengan cara ini kontrol ini tidak terhubung dengan kelas ViewModel / PageModel.
Solusi ini adalah simulasi pengikatan:
`` c #
// _counts adalah CarouselView
private void QuantityChangeTapped (pengirim objek, System.EventArgs e) // peristiwa tombol
{
CartItem item = (sender as View] .BindingContext as CartItem; // produk di keranjang jumlah itu akan berubah
_viewModel.Item = item; // setel jumlah yang sudah disimpan
_counts.ItemsSource = Enumerable.Range (1, item.QuantityRemaining) .ToList ();
_counts.Position = item.Quantity - 1; // gulir korsel ke jumlah yang sudah disimpan
ShowSlider (); // tunjukkan carousel
}
private void CountApprouveClicked (pengirim objek, System.EventArgs e) // peristiwa tombol bernama "simpan kuantitas yang dipilih"
{
CloseSlider ();
_viewModel.SelectedCount = (int) _counts.CurrentItem;
_viewModel.OnCountApprouve.Execute (null);
}

``

Menemukan yang ini lagi - hanya saja tidak ada kontrol Syncfusion yang terlibat.
Cukup item di DataTemplate yang memiliki ikatan IsVisible ke ViewModel.
Solusinya tetap sama: setel BindingMode ke OneTime.

Adakah yang bisa melihat masalah ini menguji dengan nuget di sini?

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

Lalu beri tahu saya jika Anda masih melihat pengecualian?

Adakah yang bisa melihat masalah ini menguji dengan nuget di sini?

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

Lalu beri tahu saya jika Anda masih melihat pengecualian?

Saya baru saja mencoba nugget yang Anda posting dan pengecualian terus terjadi, satu-satunya perbedaan dari pengecualian sebelumnya adalah bahwa alih-alih merujuk ke Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer sekarang pengecualian mengacu pada Xamarin.Forms.Platform.Android. Platform + DefaultRenderer

Pengecualian baru:

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

Pengecualian lama:

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

@nacompllo dapatkah Anda memposting seluruh stacktrace? Saya menyadari itu mungkin hanya satu baris yang berbeda tetapi masih berguna untuk memiliki jejak lengkap di sini

@ PureWeen Saya menguji nuget dan masih macet tetapi tumpukannya sedikit berbeda

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 ...

@Bayu_joo
Saya melampirkan semua informasi yang saya dapatkan dari jendela keluaran:

09-13 12: 37: 30.755 I / MonoDroid (21323): PENGECUALIAN TAK TERTANGAN:
09-13 12: 37: 30.758 I / MonoDroid (21323): System.ObjectDisposedException: Tidak dapat mengakses objek yang dibuang.
09-13 12: 37: 30.759 I / MonoDroid (21323): Nama objek: 'Xamarin.Forms.Platform.Android.Platform + DefaultRenderer'.
09-13 12: 37: 30.759 I / MonoDroid (21323): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, bool, int, int, int, int)
09-13 12: 37: 30.759 I / MonoDroid (21323): di (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, int, int, int, int, int)
09-13 12: 37: 30.759 I / MonoDroid (21323): di (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): di Java.Interop.JniEnvironment + InstanceMethods.CallNonvirtualVoidMethod (instance Java.Interop.JniObjectReference, jenis Java.Interop.JniObjectReference, metode Java.Interop.JniMethodInfo .JniArgumentValue * args) [0x00079] di <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 30.759 I / MonoDroid (21323): di Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue * parameter) [0x0005d] <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 30.759 I / MonoDroid (21323): di 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] di D: agent1sXamarin.Forms.Platform.Android.FormsViewGroupobjDebuggeneratedsrcXamarin.Forms.Platform.Android.FormsViewGroup.cs: 181
09-13 12: 37: 30.759 I / MonoDroid (21323): di Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () [0x0015c] di D: agent1sXamarin.Forms.Platform.AndroidVisualElementTracker.cs: 111
09-13 12: 37: 30.759 I / MonoDroid (21323): di Xamarin.Forms.Platform.Android.VisualElementRenderer`1 [TElement] .UpdateLayout () [0x00014] di D: agent1sXamarin.Forms.Platform.AndroidVisualElementRenderer.cs: 139
09-13 12: 37: 30.759 I / MonoDroid (21323): di Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout (System.Boolean berubah, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0002f] di D: agent1sXamarin.Forms.Platform.AndroidAppCompatPlatform.cs: 235
09-13 12: 37: 30.759 I / MonoDroid (21323): di Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (System.Boolean berubah, System.Int32 l, System.Int32 t, System.Int32 r, System. Int32 b) [0x0001d] di D: agent1sXamarin.Forms.Platform.AndroidPlatformRenderer.cs: 75
09-13 12: 37: 30.759 I / MonoDroid (21323): di Android.Views.ViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean berubah, System.Int32 l, System.Int32 t, System .Int32 r, System.Int32 b) [0x00008] di <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 30.759 I / MonoDroid (21323): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, bool, int, int, int, int)
System.ObjectDisposedException: 'Tidak dapat mengakses objek yang dibuang.
Nama objek: 'Xamarin.Forms.Platform.Android.Platform + DefaultRenderer'. '

09-13 12: 37: 33,822 E / mono (21323):
09-13 12: 37: 33.822 E / mono (21323): Tidak Tertangani Pengecualian:
09-13 12: 37: 33.822 E / mono (21323): System.ObjectDisposedException: Tidak dapat mengakses objek yang dibuang.
09-13 12: 37: 33.822 E / mono (21323): Nama objek: 'Xamarin.Forms.Platform.Android.Platform + DefaultRenderer'.
09-13 12: 37: 33.822 E / mono (21323): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, bool, int, int, int, int)
09-13 12: 37: 33.822 E / mono (21323): di (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.33 (intptr, intptr, int, int, int, int, int)
09-13 12: 37: 33.822 E / mono (21323): di (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): di Java.Interop.JniEnvironment + InstanceMethods.CallNonvirtualVoidMethod (instance Java.Interop.JniObjectReference, tipe Java.Interop.JniObjectReference, metode Java.Interop.JniMethodInfo, metode Java.Interop.JniMethodInfo .JniArgumentValue * args) [0x00079] di <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.822 E / mono (21323): di Java.Interop.JniPeerMembers + JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, parameter Java.Interop.JniArgumentValue *] [0x0005 <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.822 E / mono (21323): di 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] di D: agent1sXamarin.Forms.Platform.Android.FormsViewGroupobjDebuggeneratedsrcXamarin.Forms.Platform.Android.FormsViewGroup.cs: 181
09-13 12: 37: 33.822 E / mono (21323): di Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () [0x0015c] di D: agent1sXamarin.Forms.Platform.AndroidVisualElementTracker.cs: 111
09-13 12: 37: 33.822 E / mono (21323): di 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] di D: agent1sXamarin.Forms.Platform .AndroidVisualElementRenderer.cs: 139
09-13 12: 37: 33.826 E / mono-rt (21323): di Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout (System.Boolean berubah, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0002f] di D: agent1sXamarin.Forms.Platform.AndroidAppCompatPlatform.cs: 235
09-13 12: 37: 33.826 E / mono-rt (21323): di Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (System.Boolean berubah, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0001d] di D: agent1sXamarin.Forms.Platform.AndroidPlatformRenderer.cs: 75
09-13 12: 37: 33.826 E / mono-rt (21323): di Android.Views.ViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean berubah, System.Int32 l, System.Int32 t , System.Int32 r, System.Int32 b) [0x00008] di <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, bool, int, int, int, int)
09-13 12: 37: 33.826 E / mono-rt (21323): --- Akhir jejak tumpukan dari lokasi sebelumnya di mana pengecualian dilemparkan ---
09-13 12: 37: 33,826 E / mono-rt (21323):
09-13 12: 37: 33.826 E / mono-rt (21323): di Java.Interop.JniEnvironment + Strings.NewString (System.Char * unicodeChars, panjang System.Int32) [0x0001e] di <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): di Java.Interop.JniEnvironment + Strings.NewString (nilai System.String) [0x00024] di <42748fcc36b74733af2d9940a8f3cc8e>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): di Android.Runtime.JNIEnv.NewString (Teks System.String) [0x00009] di <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): di Java.Lang.Error..ctor (Pesan System.String) [0x0001f] di <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): di Android.Runtime.JavaProxyThrowable..ctor (System.Exception innerException) [0x00007] di <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): di Java.Lang.Throwable.FromException (System.Exception e) [0x0001d] di <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): di Android.Runtime.AndroidEnvironment.UnhandledException (System.Exception e) [0x00067] di <7d2292394f8c488b97f5bc2a0ac0240d>: 0
09-13 12: 37: 33.826 E / mono-rt (21323): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, bool, int, int, int, int) mengakhiri

09-13 12: 37: 33.826 E / mono-rt (21323): di (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.27 (intptr, intptr, int, int, int, int, int)
09-13 12: 37: 33.865 E / libc ++ abi (21323): mengakhiri
09-13 12: 37: 33.866 F / libc (21323): Sinyal fatal 6 (SIGABRT), kode -1 (SI_QUEUE) di tid 21323 (ame.labelrender), pid 21323 (ame.labelrender)

@nacompllo @Reveon

Coba yang ini dan beri tahu saya!

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

@Bayu_joo
Saya baru saja melakukan tes dengan nuget baru dan tampaknya masalah yang telah diselesaikan tidak lagi mereproduksi, tampaknya nuget ini menyelesaikan masalah ini. Kerja bagus.

@ PureWeen Saya melakukan tes cepat dan tampaknya pengecualiannya hilang

@ PureWeen saya juga mengonfirmasi bahwa saat ini aplikasi saya tidak mengaktifkan pengecualian ini setelah pengujian cepat.

Luar biasa !!

@PureWeen , Pengecualian tidak lagi terjadi dengan nuget yang disediakan. Legenda.

Adakah yang bisa menjelaskan cara memasang "nuget" ini ke Formulir Xamarin?

@ Edgaras91 lihat ini

@Dwi_coklat ,
Klik pada link.
Di sebelah kanan panel "nuget" akan ada tombol "lagi" (3 titik vertikal), dari menu konteks pilih "unduh [...]".
Kemudian setel (seperti yang disebutkan @Reveon ) sumber lokal nuget lokal di file sistem Anda (misalnya "C: reposlocalNugets") dan tempatkan konten zip dari zip yang diunduh ke folder ini (akan ada beberapa file Xamarin .nupkg).
Kemudian di VS Anda buka NuGet manager dan dari kotak kombo ini
obraz
pilih sumber lokal Anda (milik saya hanya disebut "lokal")
Terakhir, instal / perbarui Xamarin.Forms ke proyek yang dipilih seperti biasa.

Terima kasih @Reveon dan @BartoszKopec . Namun, saya juga memiliki integrasi berkelanjutan Dev Ops, ini akan menyenangkan .. Semoga perbaikan ini disetujui dan akan diluncurkan secepatnya!

@ Edgaras91 Saya menggunakan App Center sebagai CI dan memiliki masalah yang sama - tidak dapat menggunakannya! 😄

Dapat juga mengkonfirmasi tampilan ini untuk diselesaikan.
@ PureWeen, apakah kita tahu eta apa yang akan lebih atau kurang untuk rilis mana ini dijadwalkan?

  • kerja bagus yang berhasil, btw;)

Hai,
Untuk orang-orang yang memiliki masalah ini: dalam kasus saya, saya memiliki beberapa Label yang mengubah visibilitas melalui IsVisible .
Saya mengubahnya menjadi BackGroundColor dan TextColor adalah Color.Transparent atau tidak, dan masalah menghilang…
Semoga ini membantu ...

Apakah perbaikan ini akan disertakan dalam 4.8 berikutnya? Atau hanya 5.0?

SR berikutnya 4,8

Pengecualian yang sama pada 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

Tidak ada dalam rilis itu, Anda harus menunggu Xamarin forms 4.8 Service Release 3

Tidak ada dalam rilis itu, Anda harus menunggu Xamarin forms 4.8 Service Release 3

@joshuangfraedom Maksud Anda bahwa masalah ini telah diperbaiki dalam bentuk Xamarin 4.8 Layanan Rilis 3?

Kapan itu direncanakan untuk diterbitkan? Berapa lama menunggu ... :-)))

Saya tidak yakin, maaf, sepertinya perbaikan untuk ini ada di XF 5.0 Prarilis 1 jika Anda ingin mencobanya. @samhouts apakah kita bisa mendapatkan pembaruan pada rilis layanan lain untuk 4.8?

Saya menguji sebuah proyek dengan kesalahan yang sama, Xamarin 5.0.0.1539-pre2 dan masih berlanjut

System.ObjectDisposedException: Cannot access a dropped object

Menggunakan baris ini Forms.SetFlags ("UseLegacyRenderers") dalam proyek pengecualian memiliki ObjectName:
Xamarin.Forms.Platform.Android.AppCompat.FrameRenderer

Tanpa garis bendera, ObjectName:
Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer

@TsplayerT Dapatkah Anda memposting pelacakan tumpukan lengkap?

Ini dia:

| Utas utama | Rincian |
| ------------------- | ------------------- |
| Java.Interop | JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) |
| Java.Interop | JniPeerMembers + JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, parameter Java.Interop.JniArgumentValue *) |
| Android.Views | View.set_Enabled (nilai System.Boolean) |
| Xamarin.Forms.Platform.Android.FastRenderers | VisualElementRenderer.UpdateIsEnabled () |
| Xamarin.Forms.Platform.Android.FastRenderers | VisualElementRenderer.OnElementPropertyChanged (pengirim System.Object, System.ComponentModel.PropertyChangedEventArgs e) (pembungkus delegasi-panggil.invoke_void_object_PropertyChangedEventArgs (objek, System.ComponentModel.PropertyChangedEventArgs) |
| Xamarin.Forms | BindableObject.OnPropertyChanged (System.String propertyName) |
| Xamarin.Forms | Element.OnPropertyChanged (System.String propertyName) |
| Xamarin.Forms | BindableObject.SetValueActual (properti Xamarin.Forms.BindableProperty, Xamarin.Forms.BindableObject + konteks BindablePropertyContext, nilai System.Object, System.Boolean saat ini Menerapkan, atribut Xamarin.Forms.Internals.SetValueFlags, System.Boolean diam) |
| Xamarin.Forms | BindableObject.SetValueCore (properti Xamarin.Forms.BindableProperty, nilai System.Object, atribut Xamarin.Forms.Internals.SetValueFlags, Xamarin.Forms.BindableObject + SetValuePrivateFlags privateAttributes) |
| Xamarin.Forms | BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty properti, 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) (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.24 (intptr, intptr) |

Detail kesalahan dan informasi lainnya terlampir. report.txt

Ini harus dibuka kembali. Saya juga bisa mereproduksinya di 5.0.0.1558-pre3.
Perlu diingat bahwa saya memiliki kasus berikut - Saya memiliki beberapa elemen (Label termasuk) di dalam Frame. Saya telah membungkus Frame di kelas saya sendiri - TestFrame. Di sana, saya telah mengganti OnElementPropertyChanged. Pengecualian terjadi saat saya mendapatkan peristiwa perubahan properti untuk properti "Y". Ingatlah bahwa, terkadang, saya mendapatkan pengecualian di LabelRenderer itu sendiri, daripada di Frame. Saya kira masalah masih berlanjut, hanya dalam kasus ini muncul ketika kami memiliki Frame. Berikut pelacakan tumpukan:

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 Saya menyadari nama pengecualiannya sama tetapi jenis pengecualian ini seperti NullReferenceException. Masing-masing penyebabnya berbeda. Yang Anda miliki tidak akan terkait dengan yang ini.

Jika Anda dapat membuat masalah baru dengan repro, itu akan membantu

@ mduchev Apakah Anda melihat pengecualian Anda di 4.8?

@mduchev Saya melihat pengecualian Anda berasal dari perender khusus

Jika Anda hanya menggunakan perender kami, apakah Anda melihat pengecualian yang sama?

Anda mungkin perlu memeriksa apakah FrameRenderer Anda telah dibuang dan tidak memanggil kode ini

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 Ini mungkin masalah lain, tidak bisa mengatakan dengan pasti. Saya melihat ObjectDisposedException dan, seperti yang saya katakan, kadang-kadang pengecualian adalah ObjectDisposedException untuk FastRenderers.LabelRenderer (untuk aliran yang sama!).
Sayangnya, saya tidak dapat mengupload repro. Saya akan mencoba membuat satu dan mengujinya dengan Frame yang membungkus Label.
Saya baru saja mencoba 4.8.0.1560 dan ada pengecualian. Saya juga telah menguji & mengonfirmasinya dengan 4.7.0.1351 & 5.0.0.1558-pre3.

@mduchev atau apakah ada yang tahu mengapa Xamarin versi 5 akan dirilis dan mengatakan bahwa masalah ini telah diperbaiki tetapi masih terjadi? Saya tidak bisa mengerti

Bahkan menggunakan baris ini Forms.SetFlags (" UseLegacyRenderers ") dalam proyek, pengecualian terjadi dengan ObjectName:
Xamarin.Forms.Platform.Android.AppCompat.FrameRenderer

Tanpa baris ke bendera, pengecualian memiliki ObjectName ini:
Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer

@TsplayerT Saya pikir masalah yang kita berdua lihat (pengecualian FrameRenderer) adalah masalah yang terpisah. Masalah utama - masalah dengan LabelRenderer mungkin benar-benar diperbaiki, tetapi bug serupa terjadi dengan FrameRenderer. Saya juga memperhatikan pengecualian baru hanya ketika saya menggunakan sesuatu di dalam Frame. Sayangnya, saya tidak dapat menentukan dengan tepat tata letak dan langkah-langkah yang menyebabkan aplikasi crash. Jika Anda bisa, berikan proyek contoh dan buka edisi baru untuk pengecualian bingkai.

@ZeProgFactory Terima kasih atas solusi sempurna untuk orang-orang seperti saya, yang tidak dapat memperbarui ke versi Xamarin terbaru, karena banyak masalah, yang masih menunggu untuk ditambahkan ke sprint tertentu bahkan ...

Apakah halaman ini membantu?
0 / 5 - 0 peringkat