-
Notifications
You must be signed in to change notification settings - Fork 69
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
Segfault when Pdfium compiled with v8/xfa #130
Comments
Hi @benwr , thank you for reporting the issue. Can you please provide the exact Pdfium build and version you are using (ideally with a link), your platform details, and a minimal code sample that demonstrates the problem, so I can try to reproduce it here. Possibly related to bblanchon/pdfium-binaries#105, although that's just a guess at this stage. If so, then the problem is most likely in Just out of interest, can you explain your use case? I'm curious why you need a Javascript execution environment, and how you were planning on utilising it (since |
Sure - As I mentioned I've tried with several recent builds. The easiest to demonstrate is the most recent Here's a repo containing a minimal reproduction for me, including the .dylib from the above release: https://github.com/benwr/pdfium_segfault ( As you can see in the code, I think I need to render a page for the segfault to trigger. My use case is rendering tax forms from diverse origins to a consistent image format. Some of the forms I need to render rely on XFA, which requires v8. If |
(My workaround of "spawn a subprocess to render the page, and then in that subprocess use |
Many thanks. Your use case makes sense. While I am unable to reproduce the problem on Arch Linux x64 using your repo, sample document, and the equivalent |
Ok, I can now reproduce the problem. It's caused by You can test this patch by taking At a casual glance, the rendering output of your sample document looks the same to my untrained eye as the rendering of Adobe Acrobat Reader. |
Great, thanks for the quick fix! |
Updated README. Fix will be released in crate version 0.8.17. |
Hello! Merry Christmas, and thanks for this awesome tool!
The library works great if I use a (static or dynamic) pdfium build without v8/XFA support, but when I use a library with XFA support (I've tried multiple version numbers; static and dynamic; e.g. it happens with the pdfium-binaries' v8 lib), I get a segfault. It appears to happen when a
PdfDocument
is dropped, so my temporary workaround is to just... not drop any PdfDocuments until my program exits.The text was updated successfully, but these errors were encountered: