[go: up one dir, main page]

Crash on deleting path with empty text placed on it

Steps to reproduce:

  • Open Inkscape Edit:Fixed (not recent debug builds, seems like there's another out of bounds problem here)
  • Create some text
  • Create a path
  • Place text on path
  • Select text and remove all characters (don't just delete the object)
  • Delete the path
  • Crash

Or (added)

  1. Open Inkscape
  2. Place 'M' on the canvas w/ the text tool
  3. Zoom in to the 'M'
  4. Draw a tiny path, shorter than the 'M' itself
  5. Select All, Put on Path
  6. Select the path (only thing visible)
  7. Delete

Alternatively, try deleting the path in this file from #439 (moved) .

Backtrace (1.0alpha, on above file)

Backtrace
Thread 1 "inkscape" received signal SIGSEGV, Segmentation fault.
0x00007ffff753d6e6 in Geom::Point::operator*= (this=this@entry=0x7fffffffcc00, m=...) at ../src/2geom/point.cpp:210
210	        _pt[i] = x * m[i] + y * m[i + 2] + m[i + 4];
(gdb) bt
-0  0x00007ffff753d6e6 in Geom::Point::operator*=(Geom::Affine const&) (this=this@entry=0x7fffffffcc00, m=...) at ../src/2geom/point.cpp:210
-1  0x00007ffff69315dc in Geom::operator*(Geom::Point const&, Geom::Affine const&) (rhs=..., lhs=...) at ../src/2geom/utils.h:59
-2  0x00007ffff69315dc in Geom::BezierCurve::operator*=(Geom::Affine const&) (this=0x55555d22d310, m=...) at ../src/2geom/bezier-curve.h:147
-3  0x00007ffff745b3ea in Geom::Path::operator*=(Geom::Affine const&) (tr=..., this=0x7fffffffcc40) at ../src/2geom/path.h:508
-4  0x00007ffff745b3ea in Geom::operator*(Geom::Path const&, Geom::Affine const&) (tr=..., path=..., this=) at ../src/2geom/path.h:517
-5  0x00007ffff745b3ea in Path::LoadPath(Geom::Path const&, Geom::Affine const&, bool, bool) (this=this@entry=0x555555f10840, path=..., tr=..., doTransformation=doTransformation@entry=true, append=append@entry=true) at ../src/livarot/PathCutting.cpp:434
-6  0x00007ffff745b7e2 in Path::LoadPathVector(Geom::PathVector const&, Geom::Affine const&, bool) (this=this@entry=0x555555f10840, pv=..., tr=..., doTransformation=doTransformation@entry=true) at ../src/livarot/PathCutting.cpp:463
-7  0x00007ffff6cae029 in refresh_textpath_source(SPTextPath*) (tp=0x55555d234270) at ../src/object/sp-tspan.cpp:377
-8  0x00007ffff6cae8f9 in SPTextPath::update(SPCtx*, unsigned int) (this=0x55555d234270, ctx=0x7fffffffcf50, flags=5) at ../src/object/sp-tspan.cpp:319
-9  0x00007ffff6c7ffd5 in SPObject::updateDisplay(SPCtx*, unsigned int) (this=this@entry=0x55555d234270, ctx=ctx@entry=0x7fffffffcf50, flags=5, flags@entry=4) at ../src/object/sp-object.cpp:1245
-10 0x00007ffff6caa885 in SPText::update(SPCtx*, unsigned int) (this=0x55555d231390, ctx=0x7fffffffcf50, flags=6) at ../src/object/sp-text.cpp:147
-11 0x00007ffff6c7ffd5 in SPObject::updateDisplay(SPCtx*, unsigned int) (this=this@entry=0x55555d231390, ctx=ctx@entry=0x7fffffffcf50, flags=6, flags@entry=4) at ../src/object/sp-object.cpp:1245
-12 0x00007ffff6c536ad in SPGroup::update(SPCtx*, unsigned int) (this=0x55555d21a8c0, ctx=0x7fffffffd0d0, flags=3) at ../src/object/sp-item-group.cpp:169
-13 0x00007ffff6c7ffd5 in SPObject::updateDisplay(SPCtx*, unsigned int) (this=this@entry=0x55555d21a8c0, ctx=ctx@entry=0x7fffffffd0d0, flags=3, flags@entry=0) at ../src/object/sp-object.cpp:1245
-14 0x00007ffff6c536ad in SPGroup::update(SPCtx*, unsigned int) (this=this@entry=0x555555896190, ctx=ctx@entry=0x7fffffffd280, flags=flags@entry=2) at ../src/object/sp-item-group.cpp:169
-15 0x00007ffff6c92888 in SPRoot::update(SPCtx*, unsigned int) (this=0x555555896190, ctx=, flags=2) at ../src/object/sp-root.cpp:285
-16 0x00007ffff6c7ffd5 in SPObject::updateDisplay(SPCtx*, unsigned int) (this=0x555555896190, ctx=ctx@entry=0x7fffffffd350, flags=2, flags@entry=0) at ../src/object/sp-object.cpp:1245
-17 0x00007ffff723fa47 in SPDocument::_updateDocument() (this=this@entry=0x555559f09000) at ../src/document.cpp:1203
-18 0x00007ffff723faef in SPDocument::ensureUpToDate() (this=this@entry=0x555559f09000) at ../src/document.cpp:1228
-19 0x00007ffff723c090 in Inkscape::DocumentUndo::maybeDone(SPDocument*, char const*, unsigned int, Glib::ustring const&) (doc=0x555559f09000, key=, key@entry=0x0, event_type=event_type@entry=34, event_description=...) at ../src/document-undo.cpp:139
-20 0x00007ffff723c471 in Inkscape::DocumentUndo::done(SPDocument*, unsigned int, Glib::ustring const&) (doc=, event_type=event_type@entry=34, event_description=...) at ../src/document-undo.cpp:89
-21 0x00007ffff72be3de in Inkscape::ObjectSet::deleteItems() (this=0x5555565b7e18) at ../src/selection-chemistry.cpp:414
-22 0x00007ffff733345e in Inkscape::EditVerb::perform(SPAction*, void*) (action=, data=0x22) at ../src/verbs.cpp:978
-23 0x00007ffff733fb09 in sigc::pointer_functor2::operator()(SPAction* const&, void* const&) const (_A_a2=, _A_a1=, this=) at /usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:147
-24 0x00007ffff733fb09 in sigc::adaptor_functor >::operator()(SPAction*&, void*&) const (_A_arg2=, _A_arg1=, this=) at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:108
-25 0x00007ffff733fb09 in sigc::bind_functor<-1, sigc::pointer_functor2, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::operator()(SPAction*&) (_A_arg1=, this=) at /usr/include/sigc++-2.0/sigc++/adaptors/bind.h:1136
-26 0x00007ffff733fb09 in sigc::bind_functor<-1, sigc::bind_functor<-1, sigc::pointer_functor2, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>, SPAction*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::operator()() (this=) at /usr/include/sigc++-2.0/sigc++/adaptors/bind.h:1124
-27 0x00007ffff733fb09 in sigc::internal::slot_call, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>, SPAction*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>, void>::call_it(sigc::internal::slot_rep*) (rep=) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:461
-28 0x00007ffff6a77f83 in sigc::internal::signal_emit0::emit(sigc::internal::signal_impl*) (impl=0x555557b257c0) at /usr/include/sigc++-2.0/sigc++/signal.h:798
-29 0x00007ffff6a77f83 in sigc::signal0::emit() const (this=) at /usr/include/sigc++-2.0/sigc++/signal.h:2804
-30 0x00007ffff6a77f83 in sp_action_perform(SPAction*, void*) (action=) at ../src/helper/action.cpp:139
-31 0x00007ffff72e94a7 in sp_shortcut_invoke(unsigned int, Inkscape::UI::View::View*) (shortcut=, view=0x5555565b5a80) at ../src/shortcuts.cpp:75
-32 0x00007ffff734180b in InkscapeWindow::on_key_press_event(_GdkEventKey*) (this=0x555557130810, event=0x555558e115b0) at ../src/inkscape-window.cpp:131
-33 0x00007ffff58e9ab4 in Gtk::Widget_Class::key_press_event_callback(_GtkWidget*, _GdkEventKey*) () at /usr/lib/x86_64-linux-gnu/libgtkmm-3.0.so.1
-34 0x00007ffff4ab98f7 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
-35 0x00007ffff1c57346 in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
-36 0x00007ffff1c723cd in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
-37 0x00007ffff1c7312f in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
-38 0x00007ffff4c01534 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
-39 0x00007ffff4ab693f in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
-40 0x00007ffff4ab8948 in gtk_main_do_event () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
-41 0x00007fffeebea765 in  () at /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
-42 0x00007fffeec1af92 in  () at /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
-43 0x00007ffff5cd5417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
-44 0x00007ffff5cd5650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
-45 0x00007ffff5cd56dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
-46 0x00007ffff1f3de3d in g_application_run () at /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
-47 0x0000555555555518 in main(int, char**) (argc=1, argv=0x7fffffffdff8) at ../src/inkscape-main.cpp:67

Expected Behaviour

The text has the TextPath removed and the text is repositioned where the text would have begun on the path (remember to include offset).

There are various stop gap solutions that don't replicate deletion with a normal string of text quite so precisely.

Inkscape Version (all on Linux Mint 19.1)

  • 1.0alpha (7d5df82ec8, 2019-05-15) debug build,
  • 1.0alpha (746904b607, 2019-05-10) release build
  • 1.0alpha (9dee831, 2019-01-15) appimage

But not replicated on

  • 0.92.3 (2405546, 2018-03-11) ppa
  • 0.92.4 5da689c313, 2019-01-14 flatpak
  • 0.92.4 (2247b618b6, 2019-05-02) debug build
Edited by Nathan Lee