Selecting certain vector objects freezes Affinity indefinitely. The app is not
crashed, it is spinning on one core and never finishes.
This is a Wine bug in dlls/d2d1/geometry.c, not a problem with the install.
d2d_geometry_resolve_beziers() subdivides overlapping bezier control
triangles until they separate. When several nodes sit on practically the same
coordinates, subdividing never separates them, and every split appends a
segment that is then tested against all earlier ones. The segment count grows
until memory runs out.
Reproduced with Wine 11.0 (wine-tkg) and 11.16. Diagnosed with gdb: 30 samples
over three minutes, 100% in memmove below
d2d_geometry_sink_Close -> d2d_geometry_resolve_beziers -> d2d_geometry_split_bezier -> d2d_figure_insert_vertex.
Workaround without patching Wine: reduce the node count of the affected object
(simplify the curve, split it, or rasterise it).
Patches and a standalone reproducer are attached to the WineHQ bug:
https://bugs.winehq.org/show_bug.cgi?id=60265
The same two patches as carry patches for the Affinity wine build:
daegalus/wine-tkg-affinity#2
Selecting certain vector objects freezes Affinity indefinitely. The app is not
crashed, it is spinning on one core and never finishes.
This is a Wine bug in
dlls/d2d1/geometry.c, not a problem with the install.d2d_geometry_resolve_beziers()subdivides overlapping bezier controltriangles until they separate. When several nodes sit on practically the same
coordinates, subdividing never separates them, and every split appends a
segment that is then tested against all earlier ones. The segment count grows
until memory runs out.
Reproduced with Wine 11.0 (wine-tkg) and 11.16. Diagnosed with gdb: 30 samples
over three minutes, 100% in
memmovebelowd2d_geometry_sink_Close -> d2d_geometry_resolve_beziers -> d2d_geometry_split_bezier -> d2d_figure_insert_vertex.Workaround without patching Wine: reduce the node count of the affected object
(simplify the curve, split it, or rasterise it).
Patches and a standalone reproducer are attached to the WineHQ bug:
https://bugs.winehq.org/show_bug.cgi?id=60265
The same two patches as carry patches for the Affinity wine build:
daegalus/wine-tkg-affinity#2