2

I have a MvxRecyclerView which displays a list of items. When a item is clicked the app navigates to a detail page/activity. The detail page contains some MvxImageView's.

My problem is that after repeating navigation to the detail page and back to the list page the app just crashes.

10-27 16:38:57.495 E/mono-rt (21190): Stacktrace:
10-27 16:38:57.495 E/mono-rt (21190): 
10-27 16:38:57.495 E/mono-rt (21190):   at <unknown> <0xffffffff>
10-27 16:38:57.496 E/mono-rt (21190):   at (wrapper managed-to-native) Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a (intptr,intptr&,intptr,intptr,intptr,Java.Interop.JniArgumentValue*) <0x00007>
10-27 16:38:57.496 E/mono-rt (21190):   at Java.Interop.JniEnvironment/InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference,Java.Interop.JniObjectReference,Java.Interop.JniMethodInfo,Java.Interop.JniArgumentValue*) [0x0008f] in /Users/builder/data/lanes/3415/7db2aac3/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:12079
10-27 16:38:57.496 E/mono-rt (21190):   at Java.Interop.JniPeerMembers/JniInstanceMethods.InvokeVirtualVoidMethod (string,Java.Interop.IJavaPeerable,Java.Interop.JniArgumentValue*) [0x00068] in /Users/builder/data/lanes/3415/7db2aac3/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:31
10-27 16:38:57.496 E/mono-rt (21190):   at Android.Widget.ImageView.SetImageBitmap (Android.Graphics.Bitmap) [0x0002c] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Widget.ImageView.cs:1026
10-27 16:38:57.496 E/mono-rt (21190):   at MvvmCross.Binding.Droid.Views.MvxImageView.SetImageBitmap (Android.Graphics.Bitmap) <IL 0x00032, 0x0016f>
10-27 16:38:57.496 E/mono-rt (21190):   at MvvmCross.Binding.Droid.Views.MvxImageView/<>c__DisplayClass19_0.<ImageHelperOnImageChanged>b__0 () <IL 0x00011, 0x000bf>
10-27 16:38:57.496 E/mono-rt (21190):   at Java.Lang.Thread/RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:36
10-27 16:38:57.496 E/mono-rt (21190):   at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) [0x00009] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Java.Lang.IRunnable.cs:81
10-27 16:38:57.496 E/mono-rt (21190):   at (wrapper dynamic-method) object.751fdf82-a027-44fc-87ab-b6871a6fff2a (intptr,intptr) <IL 0x00011, 0x0001f>
10-27 16:38:57.496 E/mono-rt (21190):   at (wrapper native-to-managed) object.751fdf82-a027-44fc-87ab-b6871a6fff2a (intptr,intptr) <IL 0x0001e, 0x00087>
10-27 16:38:57.496 E/mono-rt (21190): 
10-27 16:38:57.496 E/mono-rt (21190): Attempting native Android stacktrace:

This is causing the crash and after some research I followed this debugging guide from Xamarin. Before I forced GC to collect garbage every second, the app crashes randomly. After forcing garbage collection it appeared to crash almost instantly at first or second navigation to the detail page.

How to fix this?

jooni91
  • 41
  • 1
  • 3
  • What is the exception? – Cheesebaron Oct 27 '16 at 16:55
  • I don't get any. The app just crashes and the only hint to the error is the stacktrace from above. @Cheesebaron – jooni91 Oct 27 '16 at 18:14
  • Could you please file an issue on Github here: https://github.com/MvvmCross/MvvmCross We'll have a look at what is going on. Please include thorough reproduction steps. – Cheesebaron Oct 28 '16 at 09:01
  • Was this crash reproducible on hardware or "only" the emulator? I've seen the crash on the X86 emulator, but not yet seen it on physical devices (that are arm-based if that helps), and it happened a lot on the emulator (every few mins). The Xamarin bug jooni had reported (https://bugzilla.xamarin.com/show_bug.cgi?id=46041) refers to the OS as PC Windows so hoping it's an emulator issue unless others have seen it out in the wild... – SteveC Aug 17 '17 at 10:08

0 Answers0