Android crash: Master detail page orientation change

TheGreatOneTheGreatOne USMember ✭✭

I have implemented the master detail page into my app but whenever I rotate in an Android, the app crashes. However, on the iOS it doesn't crash. What can be the cause of it? How to fix it?

Answers

  • JoeMankeJoeManke USMember ✭✭✭✭✭

    Do you have a stacktrace you can share?

  • PaulDiPietroPaulDiPietro USXamarin Team Xamurai

    A minimal reproduction would be helpful if you have one you can share.

  • MagendanzMagendanz USMember ✭✭

    I'm having the same issue, but cannot share a stack trace or exception details because VS2017 doesn't provide it. It reports only that "The application is in break mode" and "An unhandled exception occurred." That makes debugging very challenging.

  • batmacibatmaci DEMember ✭✭✭✭✭
    edited April 2018

    I am getting this stacktrace if I rotate 2 times. I am using latest xamarin forms version 2.5

    System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
    
    04-17 00:11:57.688 I/MonoDroid(10689): UNHANDLED EXCEPTION:
    04-17 00:11:57.692 I/MonoDroid(10689): System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
    04-17 00:11:57.692 I/MonoDroid(10689):   at (wrapper dynamic-method) System.Object.91065ad6-7bf4-44b7-b8b1-435aaa19deb0(intptr,intptr,bool,int,int,int,int)
    04-17 00:11:57.692 I/MonoDroid(10689):   at (wrapper managed-to-native) Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a(intptr,intptr&,intptr,intptr,intptr,Java.Interop.JniArgumentValue*)
    04-17 00:11:57.692 I/MonoDroid(10689):   at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00073] in <3cb12bce834a498199b2be6cd3e00922>:0 
    04-17 00:11:57.692 I/MonoDroid(10689):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0005d] in <3cb12bce834a498199b2be6cd3e00922>:0 
    04-17 00:11:57.692 I/MonoDroid(10689):   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) [0x00086] in D:\agent\_work\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:181 
    04-17 00:11:57.692 I/MonoDroid(10689):   at Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () [0x000c8] in D:\agent\_work\1\s\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:101 
    04-17 00:11:57.692 I/MonoDroid(10689):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].UpdateLayout () [0x00000] in D:\agent\_work\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:133 
    04-17 00:11:57.692 I/MonoDroid(10689):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].UpdateLayout (System.Collections.Generic.IEnumerable`1[T] children) [0x00034] in D:\agent\_work\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:307 
    04-17 00:11:57.692 I/MonoDroid(10689):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].OnLayout (System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0001f] in D:\agent\_work\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:293 
    04-17 00:11:57.692 I/MonoDroid(10689):   at Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean p0, System.Int32 p1, System.Int32 p2, System.Int32 p3, System.Int32 p4) [0x00008] in D:\agent\_work\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:198 
    04-17 00:11:57.692 I/MonoDroid(10689):   at (wrapper dynamic-method) System.Object.91065ad6-7bf4-44b7-b8b1-435aaa19deb0(intptr,intptr,bool,int,int,int,int)
    04-17 00:11:57.706 F/libc    (10689): Fatal signal 31 (SIGSYS), code 1 in tid 10689 ()
    04-17 00:11:57.731 F/libc    (10689): crash_dump helper failed to exec
    
Sign In or Register to comment.