Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

[Android] Swapping MainPage from MasterDetailPage causes crash in Control Gallery #3705

@samhouts

Description

@samhouts

Description

Swapping MainPage from MasterDetailPage causes crash in Control Gallery. Not sure yet if this is a problem with Control Gallery or larger.

09-04 20:19:31.257 I/MonoDroid(14996): System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.ControlGallery.Android.NativeDroidMasterDetail from native handle 0x75 (key_handle 0xc1eb5bf). ---> System.MissingMethodException: No constructor found for Xamarin.Forms.ControlGallery.Android.NativeDroidMasterDetail::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
09-04 20:19:31.258 I/MonoDroid(14996):    --- End of inner exception stack trace ---
09-04 20:19:31.258 I/MonoDroid(14996):   at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00055] in <287c23d84b25403d90bd533f61cbfb8d>:0 
09-04 20:19:31.258 I/MonoDroid(14996):   at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00116] in <287c23d84b25403d90bd533f61cbfb8d>:0 
09-04 20:19:31.258 I/MonoDroid(14996):    --- End of inner exception stack trace ---
09-04 20:19:31.258 I/MonoDroid(14996):   at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00182] in <287c23d84b25403d90bd533f61cbfb8d>:0 
09-04 20:19:31.258 I/MonoDroid(14996):   at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000c1] in <287c23d84b25403d90bd533f61cbfb8d>:0 
09-04 20:19:31.258 I/MonoDroid(14996):   at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in <287c23d84b25403d90bd533f61cbfb8d>:0 
09-04 20:19:31.258 I/MonoDroid(14996):   at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in <287c23d84b25403d90bd533f61cbfb8d>:0 
09-04 20:19:31.258 I/MonoDroid(14996):   at Android.Views.ViewGroup.GetChildAt (System.Int32 index) [0x00036] in <287c23d84b25403d90bd533f61cbfb8d>:0 
09-04 20:19:31.258 I/MonoDroid(14996):   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) [0x00045] in D:\Source-Xamarin\Xamarin.Forms\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:221 
09-04 20:19:31.258 I/MonoDroid(14996):   at Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x00010] in D:\Source-Xamarin\Xamarin.Forms\Xamarin.Forms.Platform.Android\PlatformRenderer.cs:73 
09-04 20:19:31.258 I/MonoDroid(14996):   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) [0x00009] in <287c23d84b25403d90bd533f61cbfb8d>:0 
09-04 20:19:31.258 I/MonoDroid(14996):   at (wrapper dynamic-method) System.Object.47(intptr,intptr,bool,int,int,int,int)

Steps to Reproduce

  1. Open Control Gallery
  2. Click Swap Root - TabbedPage (or any other page type)

Expected Behavior

Swaps main page

Actual Behavior

image

Basic Information

  • Version with issue: master
  • Last known good version: 3.2.0 branch
  • IDE:
  • Platform Target Frameworks:
    • iOS:
    • Android: 8.1
    • UWP:
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Screenshots

See above

Reproduction Link

Control Gallery

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockerIssue blocks next stable release. Prioritize fixing and reviewing this issue.p/Androidt/bug 🐛t/housekeeping ♻︎Internal only changes, won't be included in release notes

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions