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
Unexpected segmentation fault in ImageFont (cpy3.9, pillow8.0.1, Windows10 1909) #5033
Comments
Do you have Raqm installed? You can check this by running
If you do have Raqm installed, can you try the following change, and see if that fixes the crash? font = ImageFont.truetype(str(fontpath), 64, layout_engine=ImageFont.LAYOUT_BASIC) |
Thanks, it seems to be working. And I wonder what caused that? Can it be fixed? |
The default I think this is a duplicate of #3066, which I believe is caused by a mismatch in the FreeType version used by Pillow and that used by Raqm. The solution for Windows should be to update Raqm (or rather update the build of Raqm to one using a newer version of FreeType, since the Raqm version is the same). Alternatively, you could just uninstall Raqm and use basic layout. |
Thanks a lot! I found it. I'm using msys2, and mingw-w64-x86_64-libraqm is installed as a dependency, and msys2/mingw64/bin is added in my system PATH env. Now I removed msys2/mingw64/bin from system PATH. |
Ah, that's not quite the same; the MSYS2 version of Raqm links against the MSYS2 version of FreeType which is compiled with GCC and therefore incompatible with the MSVC build of FreeType used in Pillow wheels. In general, it is probably not a good idea to have MSYS2 binaries in the system path. |
What did you do?
just run the following code:
What did you expect to happen?
Python should not crash here.
What actually happened?
The situation is randomly one of these three: succeed, print "segment fault" only, print full traceback.
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: