Hi,
We are using SfPdfViewer (version 19.3.0.55) in our Xamarin.Forms (version 5) application in order to convert the selected PDF file to image, the operation was working fine but recently we had a crash after selecting the PDF file.
The exception says:
Cannot access a disposed object.
Object name: 'Stream has been closed'.
Here is the StackTrace:
at System.IO.FileStream.Seek (System.Int64 offset, System.IO.SeekOrigin origin) [0x0000d] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/corlib/System.IO/FileStream.cs:734
at System.IO.FileStream.set_Position (System.Int64 value) [0x0001a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/corlib/System.IO/FileStream.cs:402
at Syncfusion.SfPdfViewer.XForms.iOS.ScrollViewEx.LoadDocument (System.IO.Stream inputStream) [0x00103] in <540aa434a4d8484faecc6bc5697630be>:0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021
at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSAction.cs:178
--- End of stack trace from previous location where exception was thrown ---
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00013] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:73
at MyApp.iOS.Application.Main (System.String[] args) [0x00001] in /Users/khalidessaadani/MyApp/MyApp/MyApp/MyApp.iOS/Main.cs:12
I would appreciate if you could help me solve this problem.
Best regards.
Hi Sarath Kumar,
Thanks for your reply, I will try to create a small sample to reproduce the issue and keep you posted.
Best regards,
Khalid.