Skip to content

Calling "path.flattening()" on some DXF files crashes the Python interpreter #663

@angelo-aldrovandi-hydro-com

Description

Making a path out of a POLYLINE and calling path.flattening() crashes the Python interpreter with 0xC00000FD with some DXF files (which look completely normal files).

This is a code snippet you might use:


doc, _ = ezdxf.recover.readfile(filename)
entities = list(doc.modelspace().query('POLYLINE LWPOLYLINE'))
for entity in entities:
path = ezdxf.render.path.make_path(entity)
# This crashes Python interpreter with 0xC00000FD
vertices = list(path.flattening(tolerance))
# render/path.py:671 -> return Bezier4P((s, c1, c2, e)).flattening(distance, segments)


I'm Python 3.8.7 64bit on Windows 10 and ezdxf==0.15.2 (but I also tried 0.17.2, current stable version at the time of writing)

Thanks in advance for your support 👍

Crash.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions