Skip to content

Method get_pixmap() make the program exit without any exceptions or messages #3727

@Jianxinzhu-pact

Description

@Jianxinzhu-pact

Description of the bug

When using page.get_pixmap() method, the program simply exits without any prompts(Both in Windows and Ubuntu) and cannot catch the exception.

How to reproduce the bug

Sample code:

import fitz
# can download the pdf from http://www.christtherock.org/wp-content/uploads/2020/03/7-Basic-Commands-Week-6.pdf
pdf_path = r"E:\Files\general-pdf\pdf\us\c63a\13e5\c63a13e590b5ec65994f84e179925e49.pdf"
doc = fitz.open(pdf_path)
for page in doc:
    try:
        page.get_pixmap(matrix = fitz.Matrix(2,2))
    except:
        print("error")

When using vscode debug the code, it exits when call _mupdf.fz_run_display_list.
When using the jupyter notebook, the kernal was crashed with the exitCode 3221225477.
In Ubuntu, it exit with a message Segmentation fault

PyMuPDF version

1.24.9

Operating system

Windows

Python version

3.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    fix developedrelease schedule to be determinedupstream bugbug outside this package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions