Skip to content

page.widgets() generator SegFault 11 #520

@dgallitelli

Description

@dgallitelli

Please provide all mandatory information!

Describe the bug (mandatory)

While iterating on the widgets, obtained via the page.widgets() generator, a Segmentation Fault error is generated. When trying to access the second widget, after doing whatever operation is expected on the widget, it generates a SegFault.

To Reproduce (mandatory)

import fitz
doc = fitz.Document(<anypdf>)
for page in doc:
    for w in page.widgets():
        print(w.field_value)
        # Note if using (break) here, no Seg Fault is caused. 

Expected behavior (optional)

No Seg Fault

Screenshots (optional)

N/A

Your configuration (mandatory)

  • MacOS 10.14.6
  • Python 3.7.3, same thing on Python 3.8 and on AWS Lambda (using a Layer on both p37 and p38)
  • PyMuPDF version: 1.17 from pip

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)

This behaviour does not happen on PyMuPDF 1.16.9, while still happens on 1.16.8

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions