-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Crash shaders/ink_sparkle.frag #139
Comments
So, I now tested with the master branch a bit further, and added some prints between FPDF_LoadPage calls. pdfrx/lib/src/pdfium/pdfrx_pdfium.dart Lines 358 to 362 in 5717726
I don't know if its just the pdf files i have, the way i load them or etc. I tested this first on pdfium chromium/6259 (which is what currently is on master), and tested it also with the latest version chromium/6406 In one instance I believe, it failed to render due to an invalid glyph? And then i tried using an almost empty pdf. And sometimes it would be able to render a few pages in a short second, and then crashes. Maybe one suggests it could be a concurrency issue? Idk if that is what is used in this project? https://stackoverflow.com/a/64653357 Almost Empty PDF (chromium/6259)
Almost Empty PDF (chromium/6406)
Page with Invalid Glyph PDF (chromium/6406)
|
Basically, on pdfrx architecture, And the code there is straight enough, just calling FPDF_LoadPage, FPDF_GetPageWidthF, FPDF_GetPageHeightF, FPDFPage_GetRotation, and FPDF_ClosePage. No tricky code there. I have no idea what's wrong... |
Could also to see with the render function? I think at least some errors at that same FPDF_LoadPage? Bit weird, i do able to see first pages of the pdf, and then crashes after a second, or immidiately. pdfrx/lib/src/pdfium/pdfrx_pdfium.dart Lines 578 to 580 in 5717726
|
Every function that calls By the way, what device do you just now? Is the issue is fully producible on every device? |
I use a Samsung S23+ SM-S916B/DS Android Version 14. I'll have to test later tomorrow on emulators if I have the same issues there. And see if I can make an example reproducible. |
Ok, so i found out why i was crashing. And it's pretty stupid of me to now realize why i did it. I called PdfDocument.openData (without await) (to be used as a future later on if i wanted to have a page specific view) and then used PdfViewer.data to view the whole pdf. Not sure exactly what caused it in totality, but my class consisted of this basically. Widget build(BuildContext context) {
if (mobile) {
return PdfViewer.data(document.data, sourceName: "memreport");;
}
return FutureBuilder<PdfDocument>(
future: document.pdfdoc,
} removed the extra PdfDocument.openData and the bottom part to only use pdfviewer fixed it. |
This might be an issue with flutter itself flutter/flutter#143806 , reported to this repo since this plugin has that issue when i used it.
Tested with and without impeller.
Also tested on the master branch of flutter, same issue.
Crash Message (On 3.19.6)
Flutter Doctor
Crash Message (master, 3.22.0-14.0.pre.67)
Flutter Doctor:
The text was updated successfully, but these errors were encountered: