Hello,
here is another bug we found in your SfPdfViewer for MAUI on Android.
When we load a PDF in a PDFViewer page and scroll up and down some rounds the app is crashing.
The app is crashing too when the share button on the top of the page is touched, even if there is no code in the eventhandler.
Now when I wrote you this post I found out that it even crashes when you open it and do nothing.
The sample project with the showed PDF is attached. The Syncfusion Version in the project is 22.2.7.
Best regards
Christian Kurz
Hi Christian,
We are unable to reproduce the reported issue on our side with the attached sample. We have also attached a video for your reference.
However, we have already faced application crashes for Android with the exception "Collection was modified; enumeration operation may not execute". In this exception, we have validated it, and it will be fixed and moved to August 22, 2023. If you faced a similar issue, it will be reflected in the same weekly nuget.
Please share the replication steps and stack trace for the issue; it is useful to assist you in finding a better solution.
Regards,
Salman
Hello Salman,
thank you for your reply.
It is too bad that you haven't reproduce my issue yet. Here it happends in our normal MAUI application and in the sample project I offered for you.
When you debug it the app will stop after the crash in Android.App.SyncContext in method named post with a NullReferenceException. A screenshot and a video of showing the issue in the sample project is attached in the ZIP file.
I will be on holiday in two weeks when you will release the next nuGet release of your MAUI package, but I will tell you about it as soon as possible then.
I hope you can check now for the issue, because the displaying of such PDFs is essential for our app.
Best regards
Christian Kurz
Hi Christian,
We regret to inform you that we are still unable to reproduce this issue with provided details. After reviewing the given sample and closely examining the screen recording you provided, we attempted to reproduce the issue on our end. We also tried with other NuGet versions. However, we are unable to reproduce the issue. We have attached recorded video for both Android and Emulator.
To further investigate and reproduce this issue, we kindly request some
additional information from your end. This information will help us to
reproduce the issue.
Could you kindly provide the following details :
Regards,
Salman
Hello Salman,
it's a surprise for me that you even can't reproduce the issue. Because of this I want to give you all the informations you need.
Here I got the issues on our two android phones, on the Google Pixel 6A Phone with Android 13 with System update from 1. June 2023 and on our Samsung A13 phone with Android 13 with system update from 1. June 2023 and One UI Version 5.1.
I use .NET Framework Version 7.0.9, .NET SDK Version 7.0.306
Our MAUI Version is 7.0.92/7.0.100, SDK 7.0.300, maui-android version is
7.0.92/7.0.100 VS 17.6.33829.357
The full output of the dotnet workload list command and the dotnet --info command will be attached for better and further help.
If you want to know any futher things please let me know so that I can help you to reproduce the issue.
Best regards
Christian Kurz
Hi Christian,
We regret that we are still not able to reproduce the issue even in the same environment with the versions you have shared. Due to the lack of stack trace details involving SfPdfViewer methods, we are not even sure whether the issues occur due to the PDF viewer library. If a stack trace involving SfPdfViewer was present, we could have inferred the replication procedure or root cause.
To prevent further loss of time in attempting to reproduce the issues, we would like to schedule a web meeting to investigate the issues in your environment itself. Can you please let us know the date and time of your availability?
Regards,
Salman
Hi Salman,
it's a great idea to make a web meeting about this.
I'm here in Germany. Tomorrow on Friday I will have time for such a meeting from 11 a.m to 3 p. m. (German time)
Next week I will be back in office from Wenedsday until Friday every day from around 9 a. m. to 5 a. m. On each day I will take a lunch break around 12:30 p. m.
I hope we will find a good moment for such a meeting.
Here you get the stacktrace when I call the sample project again on our Pixel 6A, I hope that will help a litte further.
$exception {System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Pdf.PdfPageBase.AddLineCollection(TextLine textLine, TextLineCollection lineCollection, ImageRenderer renderer, Int32 lineStartIndex, Int32 glyphIndex)
at Syncfusion.Pdf.PdfPageBase.ExtractText(TextLineCollection& textLineCollection)
at Syncfusion.Maui.PdfViewer.TextInfoManager.<>c__DisplayClass89_0.<StoreTextAsync>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__273_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Syncfusion.Maui.PdfViewer.TextInfoManager.StoreTextAsync(Int32 pageNumber)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Android.App.SyncContext.<>c__DisplayClass2_0.<Post>b__0() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:line 36
at Java.Lang.Thread.RunnableImplementor.Run() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:line 36
at Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net7.0/android-33/mcw/Java.Lang.IRunnable.cs:line 84
at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 22} System.NullReferenceException
Best regards
Christian Kurz
Hi Christian ,
We have created a new ticket under your account to follow up with this query. We suggest you to follow up with the ticket for further updates. Please login using the below link.
https://support.syncfusion.com/support
Regards,
Salman
Hi Salman,
thank you.
Best regards
Christian Kurz
Hi Christian,
Please find the feedback link to track the status of the issue: https://www.syncfusion.com/feedback/45933/android-ios-sfpdfviewer-crashes-after-repetitive-scrolling-and-magnifications
Regards,
Deepak G
Hi Christian,
The fix for the issue “SfPdfViewer crashes after repetitive scrolling and magnifications” is included in our latest weekly release (22.2.10).Please use the following link to download our latest NuGet and resolve the issue.
Nuget Link: https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer/22.2.10
Feedback link: https://www.syncfusion.com/feedback/45933/android-ios-sfpdfviewer-crashes-after-repetitive-scrolling-and-magnifications
Regards,
Deepak G
Hello Deepak,
thank you for your reply.
I tested it today with your Version 22.2.12. It works fine for me.
Thank you.
Best regards
Christian Kurz
Hi Christian,
We are glad that it works, please get back to us if you need any assistance.
Regards,
Swetha