LPEs with linked paths sometimes do not recalculate after undo

Bug #1299948 reported by Liam P. White on 2014-03-31
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Liam P. White
Liam P. White

Bug Description

Live Path Effects that link to a path (Bend, Clone Original, Envelope Deformation, VonKoch) mysteriously revert to their original state (as in, before LPE calculation) after an undo (after saving, closing Inkscape, and reopening the file).

Basic steps to reproduce:

1. Draw a path on the document (doesn't matter what it is)
2. Add a live path effect that has a helper path (a PathParam, or LinkedPathParam: Bend, Clone Original, Envelope Deformation, VonKoch).
3. Draw a simple helper path, copy, and link it in to the effect menu.
4. Draw a path off to the side (doesn't matter what it is).
5. Save the file, close, and restart Inkscape. Reopen the file.
6. Modify the object you created in step 4.
7. Undo

--> All items that link a path revert to their original state.

This bug is reproducible with both latest trunk (r13241) and stable 0.48.4. (However, when testing with the "Bend" path effect in 0.48.4, Inkscape simply crashed on reopening the document. I could not obtain a stack trace because I did not have debugging symbols.)

I have included a file with instructions to replicate inside. Be sure to carefully observe the document before undoing.

Occasionally I have reproduced this bug after working with a document with a long enough undo history after applying the LPE as well.

Related branches

Liam P. White (liampwhite) wrote :
su_v (suv-lp) wrote :

On 2014-03-31 02:16 +0100, Liam P. White wrote:
> when testing with the "Bend" path effect in 0.48.4, Inkscape simply
> crashed on reopening the document.

Probably Bug #616198 “seg fault on opening my file” (fix backported to lp:inkscape/0.48.x in revision 9995 -> milestone 0.48.5).

su_v (suv-lp) wrote :

Reproduced with r13241 on OS X 10.7.5.

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
jazzynico (jazzynico) wrote :

Also reproduced on Windows XP, Inkscape trunk revision 13273.

Changed in inkscape:
status: Confirmed → Triaged
Liam P. White (liampwhite) wrote :

Busting my brain on this one...

Basically, the path effect updating code never gets called, even though the object exists. I set a breakpoint inside LPECloneOriginal::doEffect(SPCurve*) and it didn't get called on DocumentUndo::undo.

Liam P. White (liampwhite) wrote :

Recalculating the path effects on undo is a _very bad_ idea, as it will lead to incomplete undo transactions and later corruption and segfaulting. I suspect something with the XML's methods of optimizing events.

Changed in inkscape:
status: Triaged → In Progress
assignee: nobody → Liam P. White (inkscapebrony)
Liam P. White (liampwhite) wrote :

Wow, that took way longer than it should have.

Attached patch stops updating of path effects on document build, but should still allow them to function normally once the SPDocument containg the SP nodes is fully built.

Changed in inkscape:
status: In Progress → Fix Committed
su_v (suv-lp) wrote :

Reverted bug status change:
The fix is only in the 'experimental' branch for now - bug tracker will get updated once it has landed in trunk.

Changed in inkscape:
status: Fix Committed → In Progress
Liam P. White (liampwhite) wrote :

Fix committed to lp:inkscape, r13479.

su_v (suv-lp) on 2014-10-29
no longer affects: inkscape/0.91.x
Bryce Harrington (bryce) on 2015-02-23
Changed in inkscape:
status: Fix Committed → Fix Released
Liam P. White (liampwhite) wrote :

Follow-up report (regression):

- shape draw with "hand free line" disappear when combined

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments