Skip to content

Python crashes when font-related objects are accessed after the font has been closed #5479

@iorsh

Description

@iorsh

After fontforge.font object is closed, and its memory relased, any operation with its glyphs etc. causes segfault.

Sample script:

import sys, fontforge

font=fontforge.open(sys.argv[1])

gA = font["A"]
font.close()
l = gA.layers[1]

(run it with any Latin-enabled font, e.g. fontforge -script test.py Ambrosia.sfd)

Expected result: the script shall throw RuntimeError instead.

See also discussion in #5348.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions