Some files which have LPE on paths (mirror symetry) crash inkscape on load

Bug #1665595 reported by raghavendra on 2017-02-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Undecided
Jabiertxof
0.92.x
Undecided
Jabiertxof

Bug Description

Some files which have LPE effect on path crash inkscape while trying to open the file by double clicking on them. I am on the latest inkscape from bzr which is updated this morning (rev # 15524)
Steps to reproduce :

1) Download the attached svg file (owl.svg)(artwork - cc.by.sa 4.0)

2) Double click on the file.

Expected result -

Inkscape should open and the file should be loaded as usual

Actual result -

Inkscape fails to load and segfaults with a dialog box saying - "Inkscape has encountered an internal error and will close now"

su_v from the IRC has helped me get the backtrace. here is the backtrace -

(gdb) r
Starting program: /Users/su_v/TEMP/inkscape-repo/mptrunk-092x-x11/inst/bin/inkscape Downloads/_irc_misc/raghukamath-owl-001.svg
Reading symbols for shared libraries +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++............................................................................................................................................................... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000058
0x000000010003bb68 in SPDocument::getWidth ()
(gdb) bt
#0 0x000000010003bb68 in SPDocument::getWidth ()
#1 0x000000010039345b in Inkscape::LivePathEffect::LPEMirrorSymmetry::doBeforeEffect ()
#2 0x000000010031371d in Inkscape::LivePathEffect::Effect::doBeforeEffect_impl ()
#3 0x0000000100125976 in SPLPEItem::performPathEffect ()
#4 0x0000000100146f69 in SPPath::update_patheffect ()
#5 0x0000000100142ee1 in sigc::internal::signal_emit2<void, SPObject*, unsigned int, sigc::nil>::emit ()
#6 0x0000000100141ced in SPObject::emitModified ()
#7 0x00000001000eb2a6 in SPDefs::modified ()
#8 0x0000000100141cd5 in SPObject::emitModified ()
#9 0x000000010011416a in SPGroup::modified ()
#10 0x000000010014f102 in SPRoot::modified ()
#11 0x0000000100141cd5 in SPObject::emitModified ()
#12 0x000000010003da13 in SPDocument::_updateDocument ()
#13 0x000000010003da88 in SPDocument::ensureUpToDate ()
#14 0x00000001000218db in SPDesktop::init ()
#15 0x00000001003fcb00 in SPDesktopWidget::createInstance ()
#16 0x00000001003fc99b in sp_desktop_widget_new ()
#17 0x000000010004f6a0 in sp_file_open ()
#18 0x000000010000299f in sp_main_gui ()
#19 0x0000000100001ed4 in start ()
(gdb) q
The program is running. Exit anyway? (y or n) y

(lldb) r
Process 32962 launched: '/Users/su_v/TEMP/inkscape-repo/mptrunk-092x-x11/inst/bin/inkscape' (x86_64)
Process 32962 stopped
* thread #1: tid = 0x4103, 0x000000010003bb68 inkscape`SPDocument::getWidth() const + 8, stop reason = EXC_BAD_ACCESS (code=1, address=0x58)
    frame #0: 0x000000010003bb68 inkscape`SPDocument::getWidth() const + 8
inkscape`SPDocument::getWidth() const + 8:
-> 0x10003bb68: cmpq $0, 88(%rdi)
   0x10003bb6d: je 0x10003bbfa ; SPDocument::getWidth() const + 154
   0x10003bb73: movq 48(%rdi), %rcx
   0x10003bb77: testq %rcx, %rcx
(lldb) bt
* thread #1: tid = 0x4103, 0x000000010003bb68 inkscape`SPDocument::getWidth() const + 8, stop reason = EXC_BAD_ACCESS (code=1, address=0x58)
    frame #0: 0x000000010003bb68 inkscape`SPDocument::getWidth() const + 8
    frame #1: 0x000000010039345b inkscape`Inkscape::LivePathEffect::LPEMirrorSymmetry::doBeforeEffect(SPLPEItem const*) + 1563
    frame #2: 0x000000010031371d inkscape`Inkscape::LivePathEffect::Effect::doBeforeEffect_impl(SPLPEItem const*) + 109
    frame #3: 0x0000000100125976 inkscape`SPLPEItem::performPathEffect(SPCurve*, bool) + 278
    frame #4: 0x0000000100146f69 inkscape`SPPath::update_patheffect(bool) + 105
    frame #5: 0x0000000100142ee1 inkscape`sigc::internal::signal_emit2<void, SPObject*, unsigned int, sigc::nil>::emit(sigc::internal::signal_impl*, SPObject* const&, unsigned int const&) + 129
    frame #6: 0x0000000100141ced inkscape`SPObject::emitModified(unsigned int) + 93
    frame #7: 0x00000001000eb2a6 inkscape`SPDefs::modified(unsigned int) + 134
    frame #8: 0x0000000100141cd5 inkscape`SPObject::emitModified(unsigned int) + 69
    frame #9: 0x000000010011416a inkscape`SPGroup::modified(unsigned int) + 202
    frame #10: 0x000000010014f102 inkscape`SPRoot::modified(unsigned int) + 18
    frame #11: 0x0000000100141cd5 inkscape`SPObject::emitModified(unsigned int) + 69
    frame #12: 0x000000010003da13 inkscape`SPDocument::_updateDocument() + 531
    frame #13: 0x000000010003da88 inkscape`SPDocument::ensureUpToDate() + 40
    frame #14: 0x00000001000218db inkscape`SPDesktop::init(SPNamedView*, SPCanvas*, Inkscape::UI::View::EditWidgetInterface*) + 395
    frame #15: 0x00000001003fcb00 inkscape`SPDesktopWidget::createInstance(SPNamedView*) + 320
    frame #16: 0x00000001003fc99b inkscape`sp_desktop_widget_new(SPNamedView*) + 11
    frame #17: 0x000000010004f6a0 inkscape`sp_file_open(Glib::ustring const&, Inkscape::Extension::Extension*, bool, bool) + 176
    frame #18: 0x000000010000299f inkscape`sp_main_gui(int, char const**) + 1359
    frame #19: 0x0000000100001ed4 inkscape`start + 52
(lldb) q

I am running inkscape on arch linux with a updated system

Let me know if you want any more information.

thank you

=====
Original gist with the backtraces (no wrapping):
https://gist.github.com/su-v/6fe7be03d643d78320516f2130687242

raghavendra (raghavendr-raghu) wrote :
su_v (suv-lp) on 2017-02-17
tags: added: cli crash livepatheffects
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.92.0 r15299 and lp:inkscape/0.92.x r15378 on OS X 10.7.5.
(the backtraces pasted inline by the reporter were done with lp:inkscape/0.92.x r15378 on OS X 10.7.5)

Based on tests with archived builds of lp:inkscape/0.92.x:
- not reproduced with rev <= 15270,
- reproduced with rev >= 15281;
the reported issue might have been exposed with the changes of rev 15273:

Changelog:
https://bazaar.launchpad.net/~inkscape.dev/inkscape/0.92.x/changes/15281

Fix a late detected bug on mirror symmetry on undo. Backported from trunk
https://bazaar.launchpad.net/~inkscape.dev/inkscape/0.92.x/revision/15273

Based on the results of the tests with archived builds, the crash reported here seems possibly somehow (?) related to earlier bug #1665463.

Note that the crash reproduces if the file is loaded as command line parameter (or passed as command line argument by the launcher of the local file manager), but not when loaded from within a running instance of Inkscape.

Changed in inkscape:
status: New → Confirmed
description: updated
su_v (suv-lp) wrote :

Also reproduced with lp:inkscape r15524 on Ubuntu 14.04.5 LTS.

Jabiertxof (jabiertxof) on 2017-02-17
Changed in inkscape:
assignee: nobody → Jabiertxof (jabiertxof)
Jabiertxof (jabiertxof) wrote :

Fixed in trunk r.15530

Jabiertxof (jabiertxof) wrote :

Fixed in 0.92.x r.15379

Changed in inkscape:
status: Confirmed → Fix Committed
Hachmann (marenhachmann) wrote :

Thank you very much, Jabier and su_v!

jazzynico (jazzynico) on 2017-02-18
Changed in inkscape:
milestone: none → 0.93
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers