Skip to content

Segmentation fault for Font(fontbuffer=object()) #838

Closed
@user202729

Description

@user202729

Please provide all mandatory information!

Describe the bug (mandatory)

fitz.Font(fontbuffer=object()) causes a segmentation fault.

To Reproduce (mandatory)

See above.

Expected behavior (optional)

It should raise a TypeError or something.

Your configuration (mandatory)

Python 3.9.1, wheel.

Additional context (optional)

This is not how the library is supposed to be used, but mistakes can happen (for example pass a fontTools.TTFont object in), and segmentation faults are annoying in Python (normally it would print a traceback and let the user catch it)

To generalize, perhaps there should be some way to make the functions that take AnyType arguments safe from user errors?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions