-
Notifications
You must be signed in to change notification settings - Fork 556
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
Segmentation Fault when inserting three (but not two) copies of the same source page into one destination page #2742
Comments
Confirmed - thanks for your report. |
With a warning (or at least, some clutter in the output): $ python nup.py
platform/c++/implementation/internal.cpp:205:reinit_singlethreaded(): Reinitialising as single-threaded. |
The "... Reinitialising as single-threaded." text is a diagnostic rather than a warning. Unfortunately there's no way to disable it. I'll disable the diagnostic (it's actually in MuPDF, not PyMuPDF) in a future release. |
We are going to lower the priority of resolving this, because the new alternative implementation of PyMuPDF does not have this problem. |
Fixed in 1.23.9 where |
When updating from 1.23.8 to 1.23.9 or any version above, I get a segfault when python exits, if I import the module. Using import fitz_old as fitz instead fixes the problem. |
PyMuPDF-1.23.21 works fine for me with the above test, on Linux (Python-3.11) and Windows (Python-3.12). Please send complete information about the failure you're seeing - the OS, OS version, Python version, PyMuPDF version. Also include the input file if it is different from above, and your code if different from above. |
macOS 14.2.1 (ARM64/M1), Python 3.11.7, pymupdf==1.23.21.
There is no input file. It's a fairly complex Django project, and even when a simple command is ran (say Attached is the segfault report if that can help. Python-2024-02-02-184646.ips.txt I'm trying to build a smaller reproduction case, but having trouble. Running a Django command in this project will consistently segfault, however. |
…age(). This test appears to pass fine on rebased.
…age(). This test appears to pass fine on rebased.
This test appears to pass fine on rebased.
This test appears to pass fine on rebased.
Describe the bug (mandatory)
When copying the same page three times into one destination page, a segmentation fault happens.
To Reproduce (mandatory)
Download dummy.pdf, and run this script:
Expected behavior (optional)
The scripts runs without errors, and produces a file
dummy-nup.pdf
with three copies of the only page ofdummy.pdf
on its first page.Screenshots (optional)
Your configuration (mandatory)
For example, the output of
print(sys.version, "\n", sys.platform, "\n", fitz.__doc__)
would be sufficient (for the first two bullets).Additional context (optional)
A few (weird?) things:
print()
called at the last line is executed: the segmentation fault happens after it.dest.save(…)
is removed).fitz.__doc__
reads:PyMuPDF 1.23.5: Python bindings for the MuPDF 1.23.4 library.
: Could the version mismatch here explain the problem?Thanks for your work!
Louis
The text was updated successfully, but these errors were encountered: