Empty output in Knot LPE

Bug #432523 reported by Masato HASHIMOTO
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Jabiertxof

Bug Description

Segmentation fault occurs in Knot effect.

Steps to reproduce:
1) Draw a calligraphy object.
2) Apply Knot effect.
3) Cut the object.
4) Draw a calligraphy again.
5) Apply Knot effect again.

Additional info:
Cannot open the emergency saved file, Inkscape crashed.
Attached file includes backtrace and emergency saved file.

Inkscape version: trunk-r22249
locale: ja_JP.UTF-8
Build & Platform: Build 2009-09-18 on Arch linux (x86_64)

Revision history for this message
Masato HASHIMOTO (hashimo) wrote :
Revision history for this message
jazzynico (jazzynico) wrote :

Not reproduced on Ubuntu 9.04, Inkscape rev. 22249.
Can you reproduce it with any calligraphic preset or parameters?

Changed in inkscape:
importance: Undecided → High
tags: added: crash livepatheffects
Revision history for this message
su_v (suv-lp) wrote :

Not reproduced with Inkscape 0.46+devel r22240 on OS X 10.5.8

Attached drawing opens without crash, but 'empty' in Inkscape ('Select all' -> path with 0 nodes and LPE). When toggling the visibility of the Knot effect in the LPE editor, Inkscape renders the same shape as does Firefox: a light blue calligraphic shape with thin red outline.

I did not succeed in adding a Knot LPE to a new calligraphic shape - the calligraphy simply disappears (shrinks to 0 nodes according to the status line message). Toggling the visibility of the LPE renders the original calligraphic stroke again.

Copying and pasting a Knot LPE from and to a pen or pencil drawn path (with stroke, no fill) works without crashing Inkscape.

Revision history for this message
Masato HASHIMOTO (hashimo) wrote :

I realized that this issue doesn't occur every time.
I had to try to draw object and apply Knot several (sometimes many) times to reproduce it.

JazzyNico:
> Can you reproduce it with any calligraphic preset or parameters?

It reproduced with dip pen, brush, wiggly and tracing as far as I confirmed.

I tried to open emergency saved file on gdb, segfault seems to occur at same point (backtrace attached).

Revision history for this message
jazzynico (jazzynico) wrote :

Tested again and reproduced on Ubuntu 9.04, Inkscape rev. 22256 (had to try more than a dozen times).
Attached is a gdb+debug backtrace.
Seems to be easier to reproduce when the drawing is smaller than the size of the page.

I also can't open your emergency saved file. It crashes as soon as I select it with my file browser.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :
Revision history for this message
su_v (suv-lp) wrote :

Can you open the attached file? It is Masatos emergency saved file, reopened and saved locally (OS X, locale: en_US.UTF-8) with the LPE's visibility toggled off, and one unused LPE def removed.

Revision history for this message
jazzynico (jazzynico) wrote :

Yes, I can open it. But it crashes as soon as I toggle the LPE effect on.

Revision history for this message
su_v (suv-lp) wrote :

Is this another 32bit vs 64bit issue? I see no other major difference, AFAICS the commits between r22241 and current don't seem to effect LPE's or any files in 'src/2geom/'.

Revision history for this message
su_v (suv-lp) wrote :

nope…
> Build & Platform: Build 2009-09-18 on Arch linux (x86_64)

crash: Ubuntu 9.04 32bit & Arch linux 64bit
no crash: OS X 10.5.8 32bit (with 64bit support), gcc: i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1

Revision history for this message
Alvin Penner (apenner) wrote :

running Windows XP, Inkscape 0.47pre2 r22153 (Aug 24 2009), I cannot produce a crash. However, the behaviour of the Knot LPE is rather unusual.
- I load the file 432523-Knot-LPE-turned-off.svg and find that the screen has a path with 141 nodes, and the Knot Effect is already listed in the Path Effect Editor (Effect List).
- when I remove the Knot Effect, nothing happens on the display, the path is still visible.
- when I add the Knot Effect, the displayed path disappears (0 nodes)
- when I remove the Knot Effect again, then the displayed path re-appears (141 nodes) as it originally was.

the point is that the original display was wrong in that it said that the Knot Effect had been applied when it had not been applied.

Revision history for this message
su_v (suv-lp) wrote :

@Alvin - removed ≠ not visible/not applied - i.e. do you mean 'remove' as in
a) remove with button '-'
b) toggle visibility with button 'eye' in the Effect list

Revision history for this message
Alvin Penner (apenner) wrote :

ah, I get it (head slap). I wasn't aware of the fact that the 'eye' button existed. When I toggle the eye button then it goes back to normal, sorry about the confusion.

Revision history for this message
Kjohrf (kjohrf) wrote :

I just played with the Knot affect on Win XP with 0.47pre4 and the crash happened the first time I added the effect.

Revision history for this message
Alvin Penner (apenner) wrote :

running Windows XP and Inkscape 0.47pre4, I cannot produce a crash. However, during the trials I got a number of exit messages as follows :

** (inkscape.exe:3064): WARNING **: Exception during LPE Knot execution.
 lib2geom exception: lpe-knot error: group member not recognized (src/live_effects/lpe-knot.cpp:390)

Revision history for this message
Johan Engelen (johanengelen) wrote :

the bug had to do with empty domain as argument of complementOf. This happens apparently after a number of iterations "for (unsigned p = 0; p < crossing_points.size(); p++){" for certain paths.
I fixed it so it no longer crashes Inkscape.
However, now a blank output is obtained when switching on the knot lpe in "432523-Knot-LPE-turned-off.svg".

I leave this bug open so JFB can have a look and see if the empty result path is correct.
I have isolated the issue in the attached file "empty_knot_out.svg". If the shown path is scaled (smaller), the output disappears.

Changed in inkscape:
importance: High → Medium
summary: - Segfault occurs in Knot effect
+ Empty output in Knot LPE
tags: removed: crash
Revision history for this message
jazzynico (jazzynico) wrote :

@jfb, could you confirm that the empty result path is correct?
Thanks.

Revision history for this message
Jabiertxof (jabiertxof) wrote :

Fixed in master and trunk not sure when

Changed in inkscape:
assignee: nobody → Jabiertxof (jabiertxof)
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.