Bend LPE crash using a complex path as paste path (rev >= 14226)

Bug #1478168 reported by Jabiertxof
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Unassigned
lib2geom
Fix Committed
High
Alvin Penner

Bug Description

Steps to reproduce:
1.- With pencil tool and very low smooth draw a path a bit complex
2.- Copy to clipboard
3.- Draw a star
4.- Add bend LPE
5.- Paste path from clipboard in path parameter -Paste Path-
Fire a bug. Backtrace attached.

Revision history for this message
Jabiertxof (jabiertxof) wrote :
Revision history for this message
Jabiertxof (jabiertxof) wrote :

¿Can we put a size check into a 2Geom function to avoid the crash?

su_v (suv-lp)
summary: - Bend LPE crach using a complex path as paste path
+ Bend LPE crash using a complex path as paste path
tags: added: crash
Changed in inkscape:
importance: Undecided → High
Revision history for this message
su_v (suv-lp) wrote : Re: Bend LPE crash using a complex path as paste path

Reproduced with Inkscape 0.91+devel r14254 on OS X 10.7.5

Based on tests with archived builds:
- not reproduced with 0.91+devel r14224,
- reproduced with 0.91+devel r14228;
the crash seems to be related to the changes of the latest 2geom update in r14226:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/14226

Changed in inkscape:
milestone: none → 0.92
status: New → Confirmed
tags: added: 2geom regression
Revision history for this message
Jabiertxof (jabiertxof) wrote :

Also affect to pattern along path.
Steps to reproduce:
Select Pencil tool.
Unselect interactive simplify
Use Bezier mode
Select ellips shape.
Give a very low smooth value.
Start draw complex shapes and finaly you get sometimes in the same bug.

su_v (suv-lp)
summary: - Bend LPE crash using a complex path as paste path
+ Bend LPE crash using a complex path as paste path (rev >= 14226)
Revision history for this message
Alvin Penner (apenner) wrote :

attached is a proposed partial fix for this bug. In the original code, if you multiplied a non-zero sbasis of size 1 by a zero sbasis of size 1, you would get a zero sbasis of size 2. This will lead to problems downstream since it is the difference between a straight line and a cubic Bezier. This particular product was happening very frequently in the Bend Path LPE. In the new code the product will always be set to be of size 1, since it is zero.
   This does not entirely fix the crash but it seems to make it more difficult to reproduce. Originally I could get a crash just by clicking on the Add button, without even doing a paste. Now a paste is required before it crashes.

Revision history for this message
Jabiertxof (jabiertxof) wrote :

THanks Alvin, I try to test it tomorrow.

Revision history for this message
Jabiertxof (jabiertxof) wrote :

Hi Alvin, you see the comented code in this file:223?

Revision history for this message
Jabiertxof (jabiertxof) wrote :

Finaly I get time now and work without crashes in all my test, some of them with very roughen and large file draw with the pencil and with the apply bend path as shape.

Thanks!!!

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

Fix committed in lib2geom r2425.

Changed in lib2geom:
assignee: nobody → Alvin Penner (apenner)
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Alvin Penner (apenner) wrote :

the same fix has been committed to inkscape rev 14346.
unfortunately the fix does not seem to be complete. It is still possible to produce a crash, but it seems to be more difficult than before.

Revision history for this message
jazzynico (jazzynico) wrote :

Inkscape still crashes on Windows XP (32-bit), Inkscape 14648 (after the 2geom update rev. 14639, see http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/14639).

But:
 * the crash doesn't occur when Inkscape is launched in gdb (and thus I can't provide a backtrace);
 * the crash message is a bit different:
--------
Warning: limit of 200 snap sources reached, some will be ignored
Warning: limit of 200 snap sources reached, some will be ignored
WARNING: Requested update while update in progress, counter = 3
WARNING: Requested update while update in progress, counter = 3
WARNING: Requested update while update in progress, counter = 3
** (inkscape.exe:3924): CRITICAL **: void Inkscape::SelTrans::grab(const Geom::Point&, gdouble, gdouble, bool, bool): assertion `!_grabbed' failed

Revision history for this message
Jabiertxof (jabiertxof) wrote :

Hi Jazzynico, I coulden't reproduce it in Debian Stretch, it happens all the time in your machine? or only in a few ocassions?

Revision history for this message
jazzynico (jazzynico) wrote :

@Jabiertxof - It happens all the time, but it needs an extra step. Everything is still ok when I paste, and the crash occurs when I move the object.

Revision history for this message
Jabiertxof (jabiertxof) wrote :

@Jazzynico thanks!
I still couldent reproduce this problem, could you save a SVG prior the move and send here?
Could you try if It happens in a fresh document with new preferences?
Thanks in advance.

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

here is a file that produces a crash after pasting onto the star.

Windows XP, Inkscape 0.91+devel r14645 (Feb 10 2016)

unfortunately the crash is somewhat random and I cannot produce a backtrace.

Revision history for this message
jazzynico (jazzynico) wrote :

Not reproduced on Xubuntu 15.10, Inkscape trunk rev. 14651.

Revision history for this message
jazzynico (jazzynico) wrote :

Apparently a different bug. I suggest we close the report fixed (the 2geom bug is fixed), and open a new one for the new Windows only issue.

Revision history for this message
jazzynico (jazzynico) wrote :

Follow-up report: bug #1545632 "Crash when moving an LPE path with a complex path as paste path".

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

Other bug subscribers

Remote bug watches

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