Skip to content

Segmentation fault for converting jp2 file on ArchLinux #9267

@mamome2021

Description

@mamome2021

What did you do?

  1. On ArchLinux, install with pacman -S python-pillow python-pymupdf
  2. Run python test.py

What did you expect to happen?

out.png created

What actually happened?

Segmentation fault (core dumped) python test.py

What are your OS, Python and Pillow versions?

  • OS: ArchLinux
  • Python: 3.13.7
  • Pillow: 12.0.0
--------------------------------------------------------------------
Pillow 12.0.0
Python 3.13.7 (main, Aug 15 2025, 12:34:02) [GCC 15.2.1 20250813]
--------------------------------------------------------------------
Python executable is /usr/sbin/python3
System Python files loaded from /usr
--------------------------------------------------------------------
Python Pillow modules loaded from /usr/lib/python3.13/site-packages/PIL
Binary Pillow modules loaded from /usr/lib/python3.13/site-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 12.0.0
/usr/lib/python3.13/site-packages/PIL/features.py:43: UserWarning: libtk8.6.so: cannot open shared object file: No such file or directory
  warnings.warn(str(ex))
*** TKINTER support not installed
--- FREETYPE2 support ok, loaded 2.14.1
--- LITTLECMS2 support ok, loaded 2.17
--- WEBP support ok, loaded 1.6.0
--- AVIF support ok, loaded 1.3.0
--- JPEG support ok, compiled for libjpeg-turbo 3.1.2
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.4
--- ZLIB (PNG/ZIP) support ok, loaded 1.3.1
--- LIBTIFF support ok, loaded 4.7.1
--- RAQM (Bidirectional Text) support ok, loaded 0.10.3
--- LIBIMAGEQUANT (Quantization method) support ok, loaded 4.2.2
--- XCB (X protocol) support ok
--------------------------------------------------------------------

Content of test.py:

import pymupdf
from PIL import Image
image1 = Image.open('test.jp2')
image1.save('out.png')

Test image file:

test.jp2.zip

I have this error only if pymupdf and pillow are installed from Arch repository, if I install from pip no error happens.
Also if I remove import pymupdf or import pymupdf after importing PIL, no error happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions