-
Notifications
You must be signed in to change notification settings - Fork 561
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 trying to call clean_contents on certain pdfs with python 3.12 #2907
Comments
Thanks for the clear and simple reproducer. I've reproduced the problem. Interestingly, the new "rebased" implementation of PyMuPDF appears to work fine here. The rebased implementation is included in current releases and is a drop-in replacement for the classic implementation, so i recommend you use it yourself here - just change The rebased implementation will become the default (with Seeing as rebased works here, we do not intend to fix this issue in the classic implementation. Of course please let us know if you have any problems with |
I can confirm that it works with |
This is for pymupdf#2907, 'segfault trying to call clean_contents on certain pdfs with python 3.12'. We are not intending to fix this bug, so actually this test only runs on rebased.
This is for pymupdf#2907, 'segfault trying to call clean_contents on certain pdfs with python 3.12'. We are not intending to fix this bug, so actually this test only runs on rebased.
This is for pymupdf#2907, 'segfault trying to call clean_contents on certain pdfs with python 3.12'. We are not intending to fix this bug, so actually this test only runs on rebased.
This is for #2907, 'segfault trying to call clean_contents on certain pdfs with python 3.12'. We are not intending to fix this bug, so actually this test only runs on rebased.
Fixed in 1.23.9 where |
Description of the bug
Trying to use
clean_contents
on certain pdf files causes a segmentation fault when using Python 3.12. Interestingly, the same setup on Python 3.11 works just fine.I managed to strip one of the pdfs down with
mutool trim
as far as possible to reproduce the bug. Trimming it further results in the segfault to disappear.How to reproduce the bug
test11.pdf
PyMuPDF version
1.23.7
Operating system
Linux
Python version
3.12
The text was updated successfully, but these errors were encountered: