Skip to content

MTEXT rendering bug in drawing add-on #749

@IvanKachaikinCendas

Description

@IvanKachaikinCendas

For the DXF below, the very simple code taken from ezdxf docs never ends even though the DXF has only one entity (I intentionally left only one that there is an issue for).

Information and data needed to reproduce the error:

  1. A simplified Python script which triggers the error.
from ezdxf import readfile
from ezdxf.addons.drawing import matplotlib

drawing = readfile('buggy_mtext.dxf')
matplotlib.qsave(drawing.modelspace(), 'test.png')
  1. Information about the ezdxf version and the OS: happens on Windows 11, MacOS and Ubuntu 20.04. ezdxf version tested: 0.18.1, and the following project state: https://github.com/mozman/ezdxf/tree/d4084178c1b43f452188f9f05ad5c45df19cdae5
  2. You may find a problematic DXF in an archive here: buggy_mtext.zip

Expected behaviour: ezdxf exports an image, or throws an exception that the export is not possible.

Important: after some personal investigation, I am pretty sure that the loop in ezdxf/tools/text_layout.py, line 960 becomes infinitive for this plan, but to be honest have no guess how to fix it.

Thanks a lot for taking this issue into account, and do not hesitate to let me know if you need more details about this bug! :)

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