Hello,
This issue is happening for me with :
1. Syncfusion.Xamarin.SFPdfviewer (20.1.059) on Android in Xamarin Forms(5.0.0.2401).
2. Syncfusion.Xamarin.SFPdfviewer (18.1.0.4.8) on Android in Xamarin Forms(5.0.0.2401) (Your getting started project (https://github.com/syncfusion/xamarin-demos/tree/master/Forms/PdfViewer )
I view a PDF close it and open another one and close it. Then repeat the steps again. I get these errors on Android Device(Xamarin Forms Project):
Unable to activate instance of type Syncfusion.SfPdfViewer.XForms.Droid.Runnable from native handle 0x7fe3422564 (key_handle 0xd06dd49).
at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0014f] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Interop/TypeManager.cs:313
at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x00023] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:304
at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:290
at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:281
at Java.Lang.Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00006] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:275
at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00000] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-31/mcw/Java.Lang.IRunnable.cs:83
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.54(intptr,intptr)
______
"No constructor found for Syncfusion.SfPdfViewer.XForms.Droid.Runnable::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)"
Please advise.
Hi Muona,
Greetings from Syncfusion support,
We were unable to reproduce your reported error and it is working as expected. Could you please see the attached video and let us know whether we have missed out anything while replicating the issue.
Kindly share the following details to analyze more on this issue and assist you with the better solution
1..Replication video/procedure to reproduce the issue.
2. Device information.
3. PDF document (If you change in that sample)
Regards,
Vikram
We also have this issue. I could reproduce it with opening the pdf and while scrolling quickly closing the window. So the scroll view moves and then close the view. But also just opening and closing the pdf view a few times will cause the error after like 5 times.
Syncfusion.Xamarin.SFPdfviewer (20.1.056) on Android in Xamarin Forms(5.0.0.2401).
Galaxy S10e with Android 12 for example
System.NotSupportedException: Unable to activate instance of type Syncfusion.SfPdfViewer.XForms.Droid.Runnable from native handle 0x7ffb93f9d8 (key_handle 0xca30fa6). ---> System.MissingMethodException: No constructor found for Syncfusion.SfPdfViewer.XForms.Droid.Runnable::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
at Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
at java.lang.Error: Java callstack:
at at crc64f0d106695cb1f69e.Runnable.n_run(Native Method)
at at crc64f0d106695cb1f69e.Runnable.run(Runnable.java:30)
at at android.os.Handler.handleCallback(Handler.java:938)
at at android.os.Handler.dispatchMessage(Handler.java:99)
at at android.os.Looper.loopOnce(Looper.java:226)
at at android.os.Looper.loop(Looper.java:313)
at at android.app.ActivityThread.main(ActivityThread.java:8663)
at at java.lang.reflect.Method.invoke(Native Method)
at at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
--- End of inner exception stack trace ---
at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00096] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Interop/TypeManager.cs:342
at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0010c] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Interop/TypeManager.cs:306
--- End of inner exception stack trace ---
at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0014f] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Interop/TypeManager.cs:313
at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x00023] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:304
at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:290
at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:281
at Java.Lang.Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00006] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:275
at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00000] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-31/mcw/Java.Lang.IRunnable.cs:83
at at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.6(intptr,intptr)
I was able to reproduce it with the sample (https://github.com/syncfusion/xamarin-demos/tree/master/Forms/PdfViewer ) :
1) scroll in the getting started tab
2) while the page is still scrolling, tab the custom toolbar tab
System.NotSupportedException: Unable to activate instance of type Syncfusion.SfPdfViewer.XForms.Droid.Runnable from native handle 0xffb281e4 (key_handle 0x32e0c40). ---> System.MissingMethodException: No constructor found for Syncfusion.SfPdfViewer.XForms.Droid.Runnable::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
at Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
at java.lang.Error: Java callstack:
at at crc64f0d106695cb1f69e.Runnable.n_run(Native Method)
at at crc64f0d106695cb1f69e.Runnable.run(Runnable.java:30)
at at android.os.Handler.handleCallback(Handler.java:938)
at at android.os.Handler.dispatchMessage(Handler.java:99)
at at android.os.Looper.loopOnce(Looper.java:226)
at at android.os.Looper.loop(Looper.java:313)
at at android.app.ActivityThread.main(ActivityThread.java:8663)
at at java.lang.reflect.Method.invoke(Native Method)
at at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
--- End of inner exception stack trace ---
at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00096] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Interop/TypeManager.cs:342
at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0010c] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Interop/TypeManager.cs:306
--- End of inner exception stack trace ---
at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0014f] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Interop/TypeManager.cs:313
at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x00023] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:304
at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:290
at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:281
at Java.Lang.Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00006] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:275
at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00000] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-29/mcw/Java.Lang.IRunnable.cs:83
at at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.26(intptr,intptr)
I have supplied everything you requested, but if you need any more info, let me know.
Hi Johan,
Greetings from Syncfusion support,
We are able to reproduce the issue "Application crashes While scrolling and switching tabs in Sample Browser". We will validate the issue and will provide the details on July 04, 2022
Regards,
Ramesh
Hi Johan,
We have confirmed that the issue “Application crashes While scrolling and switching tabs in Sample Browser” is a defect and logged a defect report for this issue. The patch for this issue will be delivered on July 25 , 2022.
Please
find the feedback link below,
https://www.syncfusion.com/feedback/36105/android-application-crashes-while-scrolling-and-switching-tabs-in-sample-browser
Regards,
Vikram
Hi ,
We have resolved the reported issue “Application crashes
While scrolling and switching tabs in Sample Browser ”and the custom NuGet for the same can be
downloaded from the attached file.
Disclaimer:
Please note that we have created this NuGet for 20.2.0.39 version specifically to
resolve the following issue reported in this forum
175632
Note :
Kindly follow the steps to clear the NuGet cache and then install patched NuGet
to get the issue resolved.
https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache
This
fix will be included in our volume 2 - Service Pack release, which is expected to be
available by August 2022
Regards,
Vikram
Thank you, I can confirm the issue is fixed in 20.2.0.39