- Home
- Forum
- Xamarin.Forms
- Bug in Xamarin.Forms.PdfViewer v[16.1.0.24]
Bug in Xamarin.Forms.PdfViewer v[16.1.0.24]
I've just create a simple page to test this component in my project which is powered by prism framework
I saw an error as the description below:
I use Windows 10 Pro version 1709, OS Build 16299.309
Visual Studio Community 2017 15.6.2
Device: Asus zenfone 3 max (ZC553kl) which uses Android 7.1
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_152
Syncfusion version [16.1.0.24]
1. I use this code to open a 12Mb Pdf flie in ViewModel
PdfDocumentStream = System.IO.File.OpenRead(fullFilePath);
It could open the pdf file, and I can see the content in that pdf file, I can scroll down to see other pages
2. When I navigated to another screen, use prism mechanicsm, It crashed and gave me this error. Please help me check this.
03-18 12:19:01.793 I/MonoDroid(23654): UNHANDLED EXCEPTION:
03-18 12:19:01.846 I/MonoDroid(23654): System.ObjectDisposedException: Cannot access a disposed object.
03-18 12:19:01.846 I/MonoDroid(23654): Object name: 'Syncfusion.SfPdfViewer.XForms.Droid.ScrollViewEx'.
03-18 12:19:01.846 I/MonoDroid(23654): at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in:0
03-18 12:19:01.846 I/MonoDroid(23654): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualInt32Method (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in:0
03-18 12:19:01.846 I/MonoDroid(23654): at Android.Views.View.get_ScrollY () [0x0000a] in <303b75409d4e4a17bc65607d320bb98e>:0
03-18 12:19:01.846 I/MonoDroid(23654): at Syncfusion.SfPdfViewer.XForms.Droid.CountDownTimerEx.OnTick (System.Int64 millisUntilFinished) [0x00000] in <1c589328a0d14df7a16a0c57623edd27>:0
03-18 12:19:01.846 I/MonoDroid(23654): at Android.OS.CountDownTimer.n_OnTick_J (System.IntPtr jnienv, System.IntPtr native__this, System.Int64 millisUntilFinished) [0x00008] in <303b75409d4e4a17bc65607d320bb98e>:0
03-18 12:19:01.846 I/MonoDroid(23654): at (wrapper dynamic-method) System.Object.114a9a9a-9236-453a-ae50-1bfcd4b797fa(intptr,intptr,long)
03-18 12:19:01.866 E/AppCenterCrashes(23654): Unhandled Exception:
03-18 12:19:01.866 E/AppCenterCrashes(23654): System.ObjectDisposedException: Cannot access a disposed object.
03-18 12:19:01.866 E/AppCenterCrashes(23654): Object name: 'Syncfusion.SfPdfViewer.XForms.Droid.ScrollViewEx'.
03-18 12:19:01.866 E/AppCenterCrashes(23654): at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in:0
03-18 12:19:01.866 E/AppCenterCrashes(23654): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualInt32Method (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in:0
03-18 12:19:01.866 E/AppCenterCrashes(23654): at Android.Views.View.get_ScrollY () [0x0000a] in <303b75409d4e4a17bc65607d320bb98e>:0
03-18 12:19:01.866 E/AppCenterCrashes(23654): at Syncfusion.SfPdfViewer.XForms.Droid.CountDownTimerEx.OnTick (System.Int64 millisUntilFinished) [0x00000] in <1c589328a0d14df7a16a0c57623edd27>:0
03-18 12:19:01.866 E/AppCenterCrashes(23654): at Android.OS.CountDownTimer.n_OnTick_J (System.IntPtr jnienv, System.IntPtr native__this, System.Int64 millisUntilFinished) [0x00008] in <303b75409d4e4a17bc65607d320bb98e>:0
03-18 12:19:01.866 E/AppCenterCrashes(23654): at (wrapper dynamic-method) System.Object.114a9a9a-9236-453a-ae50-1bfcd4b797fa(intptr,intptr,long)
03-18 12:19:01.892 D/Mono (23654): Assembly Ref addref Microsoft.AppCenter.Crashes[0xe1877c20] -> System.Core[0xe1bc8c60]: 10
03-18 12:19:02.180 W/art (23654): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
03-18 12:19:02.187 D/Mono (23654): DllImport searching in: '__Internal' ('(null)').
03-18 12:19:02.187 D/Mono (23654): Searching for 'java_interop_jnienv_throw'.
03-18 12:19:02.187 D/Mono (23654): Probing 'java_interop_jnienv_throw'.
03-18 12:19:02.187 D/Mono (23654): Found as 'java_interop_jnienv_throw'.
An unhandled exception occured.
03-18 12:19:04.432 E/mono (23654): System.ObjectDisposedException: Cannot access a disposed object.
03-18 12:19:04.432 E/mono (23654): Object name: 'Syncfusion.SfPdfViewer.XForms.Droid.ScrollViewEx'.
03-18 12:19:04.432 E/mono (23654): at (wrapper dynamic-method) System.Object.114a9a9a-9236-453a-ae50-1bfcd4b797fa(intptr,intptr,long)
03-18 12:19:04.433 E/mono-rt (23654): [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Cannot access a disposed object.
03-18 12:19:04.433 E/mono-rt (23654): Object name: 'Syncfusion.SfPdfViewer.XForms.Droid.ScrollViewEx'.
03-18 12:19:04.433 E/mono-rt (23654): at (wrapper dynamic-method) System.Object.114a9a9a-9236-453a-ae50-1bfcd4b797fa(intptr,intptr,long)
I saw an error as the description below:
I use Windows 10 Pro version 1709, OS Build 16299.309
Visual Studio Community 2017 15.6.2
Device: Asus zenfone 3 max (ZC553kl) which uses Android 7.1
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_152
Syncfusion version [16.1.0.24]
1. I use this code to open a 12Mb Pdf flie in ViewModel
PdfDocumentStream = System.IO.File.OpenRead(fullFilePath);
It could open the pdf file, and I can see the content in that pdf file, I can scroll down to see other pages
2. When I navigated to another screen, use prism mechanicsm, It crashed and gave me this error. Please help me check this.
03-18 12:19:01.793 I/MonoDroid(23654): UNHANDLED EXCEPTION:
03-18 12:19:01.846 I/MonoDroid(23654): System.ObjectDisposedException: Cannot access a disposed object.
03-18 12:19:01.846 I/MonoDroid(23654): Object name: 'Syncfusion.SfPdfViewer.XForms.Droid.ScrollViewEx'.
03-18 12:19:01.846 I/MonoDroid(23654): at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in
03-18 12:19:01.846 I/MonoDroid(23654): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualInt32Method (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in
03-18 12:19:01.846 I/MonoDroid(23654): at Android.Views.View.get_ScrollY () [0x0000a] in <303b75409d4e4a17bc65607d320bb98e>:0
03-18 12:19:01.846 I/MonoDroid(23654): at Syncfusion.SfPdfViewer.XForms.Droid.CountDownTimerEx.OnTick (System.Int64 millisUntilFinished) [0x00000] in <1c589328a0d14df7a16a0c57623edd27>:0
03-18 12:19:01.846 I/MonoDroid(23654): at Android.OS.CountDownTimer.n_OnTick_J (System.IntPtr jnienv, System.IntPtr native__this, System.Int64 millisUntilFinished) [0x00008] in <303b75409d4e4a17bc65607d320bb98e>:0
03-18 12:19:01.846 I/MonoDroid(23654): at (wrapper dynamic-method) System.Object.114a9a9a-9236-453a-ae50-1bfcd4b797fa(intptr,intptr,long)
03-18 12:19:01.866 E/AppCenterCrashes(23654): Unhandled Exception:
03-18 12:19:01.866 E/AppCenterCrashes(23654): System.ObjectDisposedException: Cannot access a disposed object.
03-18 12:19:01.866 E/AppCenterCrashes(23654): Object name: 'Syncfusion.SfPdfViewer.XForms.Droid.ScrollViewEx'.
03-18 12:19:01.866 E/AppCenterCrashes(23654): at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in
03-18 12:19:01.866 E/AppCenterCrashes(23654): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualInt32Method (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in
03-18 12:19:01.866 E/AppCenterCrashes(23654): at Android.Views.View.get_ScrollY () [0x0000a] in <303b75409d4e4a17bc65607d320bb98e>:0
03-18 12:19:01.866 E/AppCenterCrashes(23654): at Syncfusion.SfPdfViewer.XForms.Droid.CountDownTimerEx.OnTick (System.Int64 millisUntilFinished) [0x00000] in <1c589328a0d14df7a16a0c57623edd27>:0
03-18 12:19:01.866 E/AppCenterCrashes(23654): at Android.OS.CountDownTimer.n_OnTick_J (System.IntPtr jnienv, System.IntPtr native__this, System.Int64 millisUntilFinished) [0x00008] in <303b75409d4e4a17bc65607d320bb98e>:0
03-18 12:19:01.866 E/AppCenterCrashes(23654): at (wrapper dynamic-method) System.Object.114a9a9a-9236-453a-ae50-1bfcd4b797fa(intptr,intptr,long)
03-18 12:19:01.892 D/Mono (23654): Assembly Ref addref Microsoft.AppCenter.Crashes[0xe1877c20] -> System.Core[0xe1bc8c60]: 10
03-18 12:19:02.180 W/art (23654): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
03-18 12:19:02.187 D/Mono (23654): DllImport searching in: '__Internal' ('(null)').
03-18 12:19:02.187 D/Mono (23654): Searching for 'java_interop_jnienv_throw'.
03-18 12:19:02.187 D/Mono (23654): Probing 'java_interop_jnienv_throw'.
03-18 12:19:02.187 D/Mono (23654): Found as 'java_interop_jnienv_throw'.
An unhandled exception occured.
03-18 12:19:04.432 E/mono (23654): System.ObjectDisposedException: Cannot access a disposed object.
03-18 12:19:04.432 E/mono (23654): Object name: 'Syncfusion.SfPdfViewer.XForms.Droid.ScrollViewEx'.
03-18 12:19:04.432 E/mono (23654): at (wrapper dynamic-method) System.Object.114a9a9a-9236-453a-ae50-1bfcd4b797fa(intptr,intptr,long)
03-18 12:19:04.433 E/mono-rt (23654): [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Cannot access a disposed object.
03-18 12:19:04.433 E/mono-rt (23654): Object name: 'Syncfusion.SfPdfViewer.XForms.Droid.ScrollViewEx'.
03-18 12:19:04.433 E/mono-rt (23654): at (wrapper dynamic-method) System.Object.114a9a9a-9236-453a-ae50-1bfcd4b797fa(intptr,intptr,long)
SIGN IN To post a reply.
12 Replies
NK
Navaneetha Kannan Sudalai Muthu
Syncfusion Team
March 19, 2018 10:16 AM UTC
Hi Vu,
We are able to reproduce the issue “ObjectDisposedException occurs when navigating between pages”. We have logged a defect report for the issue. The fix will be included in our Essential Studio 2018 Volume 1 – SP 1 release which is expected to be available by the end of March 2018.
If you need patch for the fix prior to the release kindly create a support incident from your Direct-Trac account.
Best,
Navaneetha Kannan
VU
vu
March 25, 2018 09:21 AM UTC
Hi syncfusion team !
Thanks for your reply. I'm waiting for your next release
Thanks for your reply. I'm waiting for your next release
NK
Navaneetha Kannan Sudalai Muthu
Syncfusion Team
March 26, 2018 10:47 AM UTC
Hi Vu,
Thank you for the update. We will let you know once Essential Studio 2018 Volume 1 – SP 1 has been rolled out.
Best,
Navaneetha Kannan
NK
Navaneetha Kannan Sudalai Muthu
Syncfusion Team
March 29, 2018 12:35 PM UTC
Hi Vu,
We are glad to announce that our Essential Studio 2018 Volume 1 SP 1 Release v16.1.0.32 is rolled out and is available for download under the following link.
The fix for the issue “ObjectDisposedException occurs when navigating between pages” has been included in this release as promised.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Best,
Navaneetha Kannan
PR
Pri
April 18, 2018 06:31 PM UTC
I am still having same issue after updating v16.1.0.32.
NK
Navaneetha Kannan Sudalai Muthu
Syncfusion Team
April 19, 2018 12:26 PM UTC
Hi Vu,
As we have promised earlier, we have included the fix for the issue “ObjectDisposedException occurs when navigating between pages” in Essential Studio 2018 Volume 1 – SP 1 release (version 16.1.0.32). In this latest version of Essential Studio, the issue will not occur.
We suspect that old assemblies are referring in your sample although you have upgraded to 16.1.0.32. It is possible that sometimes older assemblies will be automatically referred from GAC in the sample although you might have added latest assemblies.
If you have unchecked the “Uninstall the previously installed assemblies from GAC” checkbox during the installation of the 16.1.0.32 version the older assemblies may persist in GAC.
Please uninstall the older assemblies from the GAC as described in the below Knowledge Base.
If you have both 16.1.0.32 and any older version installed simultaneously, please ensure whether the latest assemblies are referenced in your sample.
If the issue occurs even after trying the above suggestions, please create a support incident under your Direct-Trac account to investigate further.
Best,
Navaneetha Kannan
DC
Dionysis Chasakis
May 21, 2018 08:01 AM UTC
Hi Syncfusion Team
The issue seems to be fixed in 16.1.0.32 but in 16.1.0.37 it happens again.
The issue seems to be fixed in 16.1.0.32 but in 16.1.0.37 it happens again.
NK
Navaneetha Kannan Sudalai Muthu
Syncfusion Team
May 22, 2018 01:34 PM UTC
Hi Vu,
Sorry for the inconvenience caused. The issue has been fixed and the fix will be included in our Essential Studio 2018 Volume 2 release which is expected to be available by the end of May 2018.
If you need the fix earlier than the release kindly create a support incident under you Direct-Trac account.
Best,
Navaneetha Kannan
FL
FEDERICA LAZZERI
June 22, 2018 01:16 PM UTC
Hi Navaneetha,
when Essential Studio 2018 Volume 2 will be available? I still have this problem with current release 16.1.0.37 and only on android. On iOS it works correctly.
Thank you,
Federica
NK
Navaneetha Kannan Sudalai Muthu
Syncfusion Team
June 26, 2018 03:46 AM UTC
Hi Federica,
We are glad to announce that our Essential Studio 2018 Volume 2 Release v16.2.0.41 is rolled out and is available for download under the following link.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Best,
Navaneetha Kannan
AS
Antonio Stan
October 29, 2018 11:41 AM UTC
Hello Syncfusion Team,
I'm using v16.3.0.21 in a Xamarin Forms application and recently I saw in App Center the following crash:
ScrollViewEx.Unload (System.Boolean isDisposeCompletely)
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Syncfusion.SfPdfViewer.XForms.Droid.CountDownTimerEx'.
and the extra info App Center could provide:
JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self)
JniPeerMembers+JniInstanceMethods.InvokeNonvirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters)
CountDownTimer.Cancel ()
ScrollViewEx.Unload (System.Boolean isDisposeCompletely)
ScrollViewEx.Unload ()
PdfDependencyServices.Unload (System.Object nativeObject)
SfPdfViewer.Unload ()
PdfPage.OnDisappearing ()
Page.SendDisappearing ()
PageRenderer.Dispose (System.Boolean disposing)
Object.Dispose ()
FragmentContainer.OnDestroyView ()
Fragment.n_OnDestroyView (System.IntPtr jnienv, System.IntPtr native__this)
(wrapper dynamic-method) System.Object.71(intptr,intptr)
It happened only once on the following type of device:
HUAWEI Y6 2017
Android 6.0 (HUAWEIMYA-L11)
I know that it's an isolated case, but if you have any idea why it occurred or how it can be avoided, please let us know.
Kind regards,
Antonio D. Stan
KK
Karthik Krishnaraj
Syncfusion Team
October 30, 2018 01:46 PM UTC
Hi Antonio,
We were unable to reproduce the issue with “Object disposed exception throws when unload PDF Viewer control” from our side. I have tried multiple times navigating the content pages with PDF Viewer control. Please find the sample which we tried from our side. Can you please modify the sample to replicate the issue and share with us? It will be helpful for us to analyze further and provide better solution.
Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/NavigationPageSample1928035199
Regards,
Karthik.
SIGN IN To post a reply.
- 12 Replies
- 7 Participants
-
VU vu
- Mar 18, 2018 05:57 AM UTC
- Oct 30, 2018 01:46 PM UTC