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

Android: No constructor found for renderer in title view #5611

Closed
alexanderzuban opened this issue Mar 19, 2019 · 4 comments · Fixed by #6467
Closed

Android: No constructor found for renderer in title view #5611

alexanderzuban opened this issue Mar 19, 2019 · 4 comments · Fixed by #6467

Comments

@alexanderzuban
Copy link

Description

Steps to Reproduce

  1. Compile the sample project
  2. Oper in portrait and rotate to landscape

Expected Behavior

Render custom button in title

Actual Behavior

Exception happends

03-19 14:20:28.494 I/MonoDroid(15748): UNHANDLED EXCEPTION:
03-19 14:20:28.504 D/Mono    (15748): Image addref System.Runtime.Serialization[0x7c1ec55680] -> System.Runtime.Serialization.dll[0x7c2fbc2800]: 2
03-19 14:20:28.504 D/Mono    (15748): Prepared to set up assembly 'System.Runtime.Serialization' (System.Runtime.Serialization.dll)
03-19 14:20:28.504 D/Mono    (15748): Assembly System.Runtime.Serialization[0x7c1ec55680] added to domain RootDomain, ref_count=1
03-19 14:20:28.510 D/Mono    (15748): AOT: image 'System.Runtime.Serialization.dll.so' not found: dlopen failed: library "/data/app/com.companyname-O-rjyf_K-dSzGXucN9iARw==/lib/arm64/libaot-System.Runtime.Serialization.dll.so" not found
03-19 14:20:28.513 D/Mono    (15748): AOT: image '/Users/builder/jenkins/workspace/xamarin-android-d15-9/xamarin-android/external/mono/sdks/out/android-arm64-v8a-release/lib/mono/aot-cache/arm64/System.Runtime.Serialization.dll.so' not found: dlopen failed: library "/data/app/com.companyname-O-rjyf_K-dSzGXucN9iARw==/lib/arm64/libaot-System.Runtime.Serialization.dll.so" not found
03-19 14:20:28.514 D/Mono    (15748): Config attempting to parse: 'System.Runtime.Serialization.dll.config'.
03-19 14:20:28.514 D/Mono    (15748): Config attempting to parse: '/Users/builder/jenkins/workspace/xamarin-android-d15-9/xamarin-android/external/mono/sdks/out/android-arm64-v8a-release/etc/mono/assemblies/System.Runtime.Serialization/System.Runtime.Serialization.config'.
03-19 14:20:28.514 D/Mono    (15748): Assembly Ref addref Mono.Android[0x7c2fb80f00] -> System.Runtime.Serialization[0x7c1ec55680]: 2
03-19 14:20:28.515 D/Mono    (15748): Assembly Ref addref System.Runtime.Serialization[0x7c1ec55680] -> mscorlib[0x7c2fd82780]: 31Loaded assembly: System.Runtime.Serialization.dll [External]

03-19 14:20:28.553 I/MonoDroid(15748): System.NotSupportedException: Unable to activate instance of type CustomRender.Droid.CustomButtonCR from native handle 0x7fdee7e524 (key_handle 0xb514a48). ---> System.MissingMethodException: No constructor found for CustomRender.Droid.CustomButtonCR::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
03-19 14:20:28.554 I/MonoDroid(15748):    --- End of inner exception stack trace ---
03-19 14:20:28.554 I/MonoDroid(15748):   at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00055] in <b781ed64f1d743e7881ac038e0fbdf85>:0 
03-19 14:20:28.554 I/MonoDroid(15748):   at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00116] in <b781ed64f1d743e7881ac038e0fbdf85>:0 
03-19 14:20:28.554 I/MonoDroid(15748):    --- End of inner exception stack trace ---
03-19 14:20:28.554 I/MonoDroid(15748):   at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00182] in <b781ed64f1d743e7881ac038e0fbdf85>:0 
03-19 14:20:28.554 I/MonoDroid(15748):   at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000c1] in <b781ed64f1d743e7881ac038e0fbdf85>:0 
03-19 14:20:28.554 I/MonoDroid(15748):   at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in <b781ed64f1d743e7881ac038e0fbdf85>:0 
03-19 14:20:28.554 I/MonoDroid(15748):   at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in <b781ed64f1d743e7881ac038e0fbdf85>:0 
03-19 14:20:28.554 I/MonoDroid(15748):   at Java.Lang.Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00006] in <b781ed64f1d743e7881ac038e0fbdf85>:0 
03-19 14:20:28.554 I/MonoDroid(15748):   at Android.Views.View+IOnAttachStateChangeListenerInvoker.n_OnViewDetachedFromWindow_Landroid_view_View_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_detachedView) [0x00000] in <b781ed64f1d743e7881ac038e0fbdf85>:0 
03-19 14:20:28.554 I/MonoDroid(15748):   at (wrapper dynamic-method) System.Object.28(intptr,intptr,intptr)
03-19 14:20:28.579 W/zygote64(15748): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
03-19 14:20:28.586 D/Mono    (15748): DllImport searching in: '__Internal' ('(null)').
03-19 14:20:28.587 D/Mono    (15748): Searching for 'java_interop_jnienv_throw'.
03-19 14:20:28.587 D/Mono    (15748): Probing 'java_interop_jnienv_throw'.
03-19 14:20:28.587 D/Mono    (15748): Found as 'java_interop_jnienv_throw'.
03-19 14:20:28.693 E/mono-rt (15748): Stacktrace:
03-19 14:20:28.693 E/mono-rt (15748): 
03-19 14:20:28.693 E/mono-rt (15748):   at <unknown> <0xffffffff>
03-19 14:20:28.693 E/mono-rt (15748):   at (wrapper managed-to-native) Java.Interop.NativeMethods.java_interop_jnienv_new_string (intptr,intptr&,char*,int) <0x00007>
03-19 14:20:28.693 E/mono-rt (15748):   at Java.Interop.JniEnvironment/Strings.NewString (char*,int) [0x00009] in <286213b9e14c442ba8d8d94cc9dbec8e>:0
03-19 14:20:28.693 E/mono-rt (15748):   at Android.Runtime.JNIEnv.NewString (char[],int) [0x00023] in <b781ed64f1d743e7881ac038e0fbdf85>:0
03-19 14:20:28.693 E/mono-rt (15748):   at Android.Runtime.JNIEnv.BinaryName (string) [0x000b9] in <b781ed64f1d743e7881ac038e0fbdf85>:0
03-19 14:20:28.693 E/mono-rt (15748):   at Android.Runtime.JNIEnv.FindClass (string) [0x00001] in <b781ed64f1d743e7881ac038e0fbdf85>:0
03-19 14:20:28.693 E/mono-rt (15748):   at Android.App.Application.get_Context () [0x00012] in <b781ed64f1d743e7881ac038e0fbdf85>:0
03-19 14:20:28.693 E/mono-rt (15748):   at Android.App.SyncContext.Post (System.Threading.SendOrPostCallback,object) [0x00014] in <b781ed64f1d743e7881ac038e0fbdf85>:0
03-19 14:20:28.693 E/mono-rt (15748):   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.ThrowAsync (System.Exception,System.Threading.SynchronizationContext) [0x0002b] in <d4a23bbd2f544c30a48c44dd622ce09f>:0
03-19 14:20:28.693 E/mono-rt (15748):   at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.SetException (System.Exception) [0x00036] in <d4a23bbd2f544c30a48c44dd622ce09f>:0
03-19 14:20:28.694 E/mono-rt (15748):   at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer/<DeviceInfoPropertyChanged>d__72.MoveNext () [0x00026] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:542
03-19 14:20:28.694 E/mono-rt (15748):   at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start<Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer/<DeviceInfoPropertyChanged>d__72> (Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer/<DeviceInfoPropertyChanged>d__72&) [0x00033] in <d4a23bbd2f544c30a48c44dd622ce09f>:0
03-19 14:20:28.694 E/mono-rt (15748):   at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.DeviceInfoPropertyChanged (object,System.ComponentModel.PropertyChangedEventArgs) [0x0002f] in <62b610a0b264471eb9ead2b9adfb1185>:0
03-19 14:20:28.694 E/mono-rt (15748):   at Xamarin.Forms.Internals.DeviceInfo.OnPropertyChanged (string) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\DeviceInfo.cs:49
03-19 14:20:28.694 E/mono-rt (15748):   at Xamarin.Forms.Internals.DeviceInfo.set_CurrentOrientation (Xamarin.Forms.Internals.DeviceOrientation) [0x00020] in D:\a\1\s\Xamarin.Forms.Core\DeviceInfo.cs:21
03-19 14:20:28.694 E/mono-rt (15748):   at Xamarin.Forms.Forms/AndroidDeviceInfo.CheckOrientationChanged (Android.Content.Res.Orientation) [0x00019] in D:\a\1\s\Xamarin.Forms.Platform.Android\Forms.cs:341
03-19 14:20:28.694 E/mono-rt (15748):   at Xamarin.Forms.Forms/AndroidDeviceInfo.ConfigurationChanged (object,System.EventArgs) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\Forms.cs:348
03-19 14:20:28.694 E/mono-rt (15748):   at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.OnConfigurationChanged (Android.Content.Res.Configuration) [0x00007] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:66
03-19 14:20:28.694 E/mono-rt (15748):   at Android.App.Activity.n_OnConfigurationChanged_Landroid_content_res_Configuration_ (intptr,intptr,intptr) [0x00013] in <b781ed64f1d743e7881ac038e0fbdf85>:0
03-19 14:20:28.694 E/mono-rt (15748):   at (wrapper dynamic-method) object.4 (intptr,intptr,intptr) [0x00017] in <d4a23bbd2f544c30a48c44dd622ce09f>:0
03-19 14:20:28.694 E/mono-rt (15748):   at (wrapper native-to-managed) object.4 (intptr,intptr,intptr) [0x00022] in <d4a23bbd2f544c30a48c44dd622ce09f>:0
03-19 14:20:28.694 E/mono-rt (15748): /proc/self/maps:

Basic Information

  • Version with issue: 3.6
  • Platform Target Frameworks:
    • Android: 8.0(phone), 8.1(tablet)

It maybe releated to #2584

Reproduction Link

CustomRender.zip

@jfversluis
Copy link
Member

@kvpt I see a comment from you in #6550 for the title view. This has not been fixed yet, right?

@kvpt
Copy link
Contributor

kvpt commented Sep 3, 2019

I'm not sure, the DeviceInfoPropertyChanged part is similar to the stacktrace in #6550 (comment) but I don't see the ResetToolbar part.
Will have to test the reproduction case to confirm.

@kvpt
Copy link
Contributor

kvpt commented Sep 10, 2019

I tested the reproduction.
It crash with 3.6.x and not with 4.2.x which include my fix.
So yes, I confirm that this issue is fixed by #6467.

@samhouts
Copy link
Contributor

closed by #6467

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants