Inkscape goes into guru meditation while using 'Gears' effect on path with 'Bend' effect

Bug #744612 reported by Maksym Kit on 2011-03-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Inkscape goes into infinite loop after applying 'Gears' effect to horizontal path with 'Bend' effect applied.

Steps to reproduce:
1. draw straight horizontal path (with Ctrl pressed) (bug appears also for not horizontal lines but less reproducable);
2. apply path effect: Bend;
3. use 'Edit on canvas' tool to select drawed path: a green path modification line occurs;
4. drag path modification line at the middle a little bit topwards;
5. apply path effect: Gears;
Here Inkscape can go into infinite loop with memory leak. If it not then try to drag green path modification line at the middle to make it less curvy until.

Here is the video of such behavior:

su_v (suv-lp) on 2011-03-28
tags: added: livepatheffects
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.48+devel r10130 on OS X 10.5.8 (i386)

Alternative steps to reproduce:

1) draw horizontal line
2) add Bend LPE and node-edit the bend path (symmetrically)
3) switch to select tool
4) add gears effect
   -> LPEs are stacked and the first gear is rendered ok
5) reselect Bend LPE and node-edit bend-path
   -> Inkscape hangs

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

Also reproduced on Windows XP, Inkscape trunk revision 12481.

Changed in inkscape:
status: Confirmed → Triaged
Beluga (buovjaga) wrote :

No hang for me with either method.

Arch Linux 64-bit, KDE Plasma 5
Inkscape 0.92+devel 15099 (GTK3)

jazzynico (jazzynico) wrote :

Reproduced on Xubuntu 16.04, Inkscape 0.91.
Not reproduced with lp:inkscape rev. 15102 and lp:inkscape/0.92.x rev. 15067.

Changed in inkscape:
milestone: none → 0.92
status: Triaged → Fix Committed
su_v (suv-lp) wrote :

Still reproduced with lp:inkscape/0.92.x r15067 and lp:inkscape r15036 (on OS X 10.7.5), default (new) prefs, default new document: dragging a node handle of the bend path in step 5 (based on the steps in comment #1) consistently causes inkscape to hang (100% CPU).

Jabiertxof (jabiertxof) wrote :

Coulden`t reproduce with 0.92.x last commit "15069"
Also fix the auto change to last of selected LPE hapends previously.

Jabiertxof (jabiertxof) wrote :

commit is in trunk and backported to 0.92.x

su_v (suv-lp) wrote :

Fix not confirmed - after rebuilding trunk in VM (guest: Ubuntu 14.04 LTS), and stable 0.92.x on the host:
- stable 0.92.x r15067, r15069 on OS X 10.7.5 this time hang consistently when adding the Gears path effect
- trunk r15077 on Ubuntu 14.04 hanged with steps from comment #1 as described (though it required at least two drags of the node handles)
- trunk r15103 on Ubuntu 14.04 hanged the same way as r15077 did (after two or more drags of a node handle of the bend path)
- after quitting and restarting the VM:
  trunk r15103 hangs when adding the Gears path effect (as originally reported)

- tests on Ubuntu done with local builds, run with gdb in Xnest under twm
- on OS X 10.7.5, the bug exposes 'heisenbug' qualities (inconsistencies with regard to which steps trigger the hang with identical builds).

Detailed steps used on Ubuntu, based on comment #1:
1) launch inkscape (default (new) prefs, default new doc
2) zoom to 100% ('1')
2) switch to the pen tool ('B')
3) draw a horizontal line (with 'Ctrl' pressed)
4) switch to the select tool (with 'S')
4) open 'Path > Path Effects ...'
5) add 'Bend' path effect
6) click on the node-tool icon in the 'Path Effects' dialog
    to edit the bend path
7) hover the green bend path on-canvas, grab it in the middle and
    drag it upwards
8) switch to the select tool (with 'S')
9) add 'Gears' path effect to the selected path
10) in the 'Path Effects' dialog, select the 'Bend' path effect
    in the list of stacked path effects of the selected path
11) click on the node-tool icon in the 'Path Effects' dialog
    to edit the bend path
12) on-canvas, click once on the green bend path
    (this will select the two end nodes, and display the node handles)
13) grab the node handle of the start node (on the left), and
    drag it e.g. to the left
14) if inkscape does not hang, release the drag, and
    repeat step 13 (this time, drag the handle e.g. back to the right)

Jabiertxof (jabiertxof) wrote :

Thanks su_v, your last steps come very handly to me!

Think now is fixed, still is slow if first segment is very short and the others segments no because need to calculate a lot, noticed specialy with bend path that make extra nodes to the original path at "random positions".

The infinite loop become because there is degenerated segment/s in the beded path.
I mark it as solved.

Jabiertxof (jabiertxof) wrote :

Fixed in trunk in r.15104 and in 0.92.x in r.15070

Changed in inkscape:
assignee: nobody → Jabiertxof (jabiertxof)
su_v (suv-lp) wrote :

Hang (with 100% CPU) still reproduced with lp:inkscape r15104 (Ubuntu 14.04) and lp:inkscape/0.92.x r15070 (OS X 10.7.5) - either hangs right away when applying the Gears effect, or later on when editing the bend path (possibly depends on the exact geometry resulting from initial modifications of the bend path).

Jabiertxof (jabiertxof) wrote :

@su_v: if you give enought time the hang stop?
Is a know problem if one segment is very short and there is another segment very big.

Jabiertxof (jabiertxof) wrote :

The LPE hangs while calculate all

Jabiertxof (jabiertxof) wrote :

Is more a performance problem I think

Jabiertxof (jabiertxof) wrote :

You can have it without bend path

Jabiertxof (jabiertxof) wrote :

Forguet comment the problem hapends if 2 curve of the path is very little

Jabiertxof (jabiertxof) wrote :

Here are a patch to the temporary hangs. It add a new parameter to Gears with the minimun radius to use.

su_v (suv-lp) wrote :

Patch from comment #17 tested successfully with lp:inkscape/0.92.x r15070.

Jabiertxof (jabiertxof) wrote :

Thanks @su_v for your tests.
I try to commit today.

Jabiertxof (jabiertxof) wrote :


Bryce Harrington (bryce) on 2017-01-10
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers