-
Notifications
You must be signed in to change notification settings - Fork 537
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
PyMuPDF 1.24.4 causes "segmentation fault" under Python 3.12 and old MAC OS #3495
Comments
Please provide data to reproduce this! |
What more data do you need? I have already mentioned that the minimal script to reproduce this simply consists of this one import statement. Python itself and macOS do not provide any more information, at least none that is obvious to me. |
After upgrading pymupdf to 1.24.4 on another Mac (macOS 11.7.10, Python 3.12.3) the crash now occurs there, too.
|
Thanks for providing more background. |
I have seen that the Anyway, I have run the test script again in iTerm, and it results in the same crash. |
Could you provide the crash report from running in a terminal window? |
When run in macOS's Terminal application, the crash data is the same as in the previous error reports
|
I get a similar issue running
|
I'm unable to reproduce this problem with MacOS arm64, Python-3.12.3 and PyMuPDF-1.24.4. All released PyMuPDF wheels are fully tested on the Github machine on which they are built, so it's possible that there's a problem with older releases of MacOS. |
I got similar error when I run below code:
PyMuPDF version Operating system Python version |
I've managed to get access to an older MacOS machine and have reproduced the problem. I don't yet know why things are going wrong, and am unable to build PyMuPDF/MuPDF locally, so it might take a while to figure things out. |
At the same time this issue occurred, there was also an error in the then latest version of the |
same problem |
Thanks for mentioning this. I'm reluctant to try to replicate The underlying problem seems to be a bug in old MacOS systems, so the correct thing to do is fix these systems, not for a multitude of software packages to each work around the problem. So i'm going to put this issue on hold for now. I'll keep it on my todo list, so it's possible i might have time to try again in the future. |
I used faulthandler module to trace the problem, and here is the log (Python3.12, PyMuPDF1.2.7)
Then I update my mac to BIg Sur 11.7.10, using Python 11, Python 12 and Python 9, the problem still remains the same. |
same problem |
Same problem. MacOS 11.7.10, Python 3.12, PyMuPDF 1.24.7. Last working version is 1.24.2. So the bug was introduced in 1.24.3 already. |
Same problem here too ! EDIT : Turned out it was caused by me trying to render text without having a font specified. Once I corrected it, no more seg fault. filling_text = font.render(f"{self.filling_percentage:.1%}", True, (255,255,255)) |
This issue started happening to me last week. I ran the script using GDB: The GNU Project Debugger
OS:
python:
PyMuPDF:
GDB backtrace:
|
My code was opening pdf files in a for loop like:
As you can see, there is no code to close the file: current versions:
|
Trying to launch comfyui on mac os sequoia. i updated home brew, pytorch, all that stuff. and terminal is telling me: zsh: segmentation fault python3.12 main.py and i cant get into comfyui now |
Description of the bug
After upgrading from Python 3.11.9 to Python 3.12.3, scripts that use PyMuPDF now cause an error "segmentation fault" when run in the console. After that, there is a system error dialog showing that the Python interpreter has crashed.
How to reproduce the bug
Upgrade the Python interpreter from 3.11 to 3.12 and activate it:
Installation through MacPorts with
port install python312
Activation through
port select --set python python312 && sudo port select --set python3 python312
The simplest script to trigger the issue is just
import fitz
Machine information:
macOS 10.13.6
Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz
PyMuPDF version
1.24.4
Operating system
MacOS
Python version
3.12
The text was updated successfully, but these errors were encountered: