Inkscape hangs after switching to Text tool in a complex SVG file
The attached file causes Inkscape to hang almost immediately
Steps to reproduce:
- Load the attached file 'b.svg'
- Zoom in with Ctrl-ScrollWheel
- Select text, e.g. the word "Group" on the right-hand side
- Select the text tool by clicking on the "A" button on the left-hand tool bar
- Try to switch back to the selction tool
What happened?
After switching to the text tool, Inkscape hangs and does not react to any further user input
Inkscape Version and Operating System:
-
Inkscape Version: I've tried it with
- 0.92.3 (as bundled with Ubuntu 18.04)
- 0.92.4 (from the PPA)
- 1.0beta1 (fe3e3069, 2019-09-17) (using the AppImage)
-
Operating System: Ubuntu Linux 18.04.3 LTS
Example file
The file has been produced with R, using ggplot2, cowplot, and the ggsave function. Sorry that it is so big but I did not manage to trim it down without losing the crash effect
Debugging
I ran Inkscape in gdb and used Ctrl-C a number of times: It seems that Inkscape is stuck (or looping endlessly) in a function called Inkscape::Drawing::_pickItemsForCaching
, looping through some list of type std::list<Inkscape::CacheRecord>
.
Here's the back trace:
Thread 1 "ld-linux-x86-64" received signal SIGINT, Interrupt.
0x00007ffff656f7c4 in void std::__cxx11::list<Inkscape::CacheRecord, std::allocator<Inkscape::CacheRecord> >::sort<std::greater<Inkscape::CacheRecord> >(std::greater<Inkscape::CacheRecord>) () from /tmp/.mount_InkscasQtLFC/usr/bin/../lib/inkscape/libinkscape_base.so
(gdb) bt
#0 0x00007ffff656f7c4 in void std::__cxx11::list<Inkscape::CacheRecord, std::allocator<Inkscape::CacheRecord> >::sort<std::greater<Inkscape::CacheRecord> >(std::greater<Inkscape::CacheRecord>) () from /tmp/.mount_InkscasQtLFC/usr/bin/../lib/inkscape/libinkscape_base.so
#1 0x00007ffff656e7a5 in Inkscape::Drawing::_pickItemsForCaching() () from /tmp/.mount_InkscasQtLFC/usr/bin/../lib/inkscape/libinkscape_base.so
#2 0x00007ffff6dd9714 in find_item_at_point(std::deque<SPItem*, std::allocator<SPItem*> >*, unsigned int, Geom::Point const&, SPItem*) ()
from /tmp/.mount_InkscasQtLFC/usr/bin/../lib/inkscape/libinkscape_base.so
#3 0x00007ffff6ddf324 in SPDocument::getItemAtPoint(unsigned int, Geom::Point const&, bool, SPItem*) const ()
from /tmp/.mount_InkscasQtLFC/usr/bin/../lib/inkscape/libinkscape_base.so
#4 0x00007ffff6a40bd2 in Inkscape::UI::Tools::TextTool::root_handler(_GdkEvent*) () from /tmp/.mount_InkscasQtLFC/usr/bin/../lib/inkscape/libinkscape_base.so
#5 0x00007ffff6a44760 in Inkscape::UI::Tools::sp_event_context_virtual_root_handler(Inkscape::UI::Tools::ToolBase*, _GdkEvent*) ()
from /tmp/.mount_InkscasQtLFC/usr/bin/../lib/inkscape/libinkscape_base.so
#6 0x00007ffff6a4619b in Inkscape::UI::Tools::sp_event_context_root_handler(Inkscape::UI::Tools::ToolBase*, _GdkEvent*) ()
from /tmp/.mount_InkscasQtLFC/usr/bin/../lib/inkscape/libinkscape_base.so
#7 0x00007ffff6db2f87 in sp_desktop_root_handler(SPCanvasItem*, _GdkEvent*, SPDesktop*) ()
from /tmp/.mount_InkscasQtLFC/usr/bin/../lib/inkscape/libinkscape_base.so
#8 0x00007ffff66b2093 in sp_marshal_BOOLEAN__POINTER () from /tmp/.mount_InkscasQtLFC/usr/bin/../lib/inkscape/libinkscape_base.so
#9 0x00007ffff158b10d in g_closure_invoke () from /tmp/.mount_InkscasQtLFC/usr/lib/libgobject-2.0.so.0
#10 0x00007ffff159e05e in ?? () from /tmp/.mount_InkscasQtLFC/usr/lib/libgobject-2.0.so.0
#11 0x00007ffff15a60af in g_signal_emit_valist () from /tmp/.mount_InkscasQtLFC/usr/lib/libgobject-2.0.so.0
#12 0x00007ffff15a712f in g_signal_emit () from /tmp/.mount_InkscasQtLFC/usr/lib/libgobject-2.0.so.0
#13 0x00007ffff65ba34a in SPCanvas::emitEvent(_GdkEvent*) () from /tmp/.mount_InkscasQtLFC/usr/bin/../lib/inkscape/libinkscape_base.so
#14 0x00007ffff65bccf6 in SPCanvas::handle_motion(_GtkWidget*, _GdkEventMotion*) () from /tmp/.mount_InkscasQtLFC/usr/bin/../lib/inkscape/libinkscape_base.so
#15 0x00007ffff447e7fb in ?? () from /tmp/.mount_InkscasQtLFC/usr/lib/libgtk-3.so.0
#16 0x00007ffff158b10d in g_closure_invoke () from /tmp/.mount_InkscasQtLFC/usr/lib/libgobject-2.0.so.0
#17 0x00007ffff159dde8 in ?? () from /tmp/.mount_InkscasQtLFC/usr/lib/libgobject-2.0.so.0
#18 0x00007ffff15a60af in g_signal_emit_valist () from /tmp/.mount_InkscasQtLFC/usr/lib/libgobject-2.0.so.0
#19 0x00007ffff15a712f in g_signal_emit () from /tmp/.mount_InkscasQtLFC/usr/lib/libgobject-2.0.so.0
#20 0x00007ffff45c6534 in ?? () from /tmp/.mount_InkscasQtLFC/usr/lib/libgtk-3.so.0
#21 0x00007ffff447b86e in ?? () from /tmp/.mount_InkscasQtLFC/usr/lib/libgtk-3.so.0
#22 0x00007ffff447d948 in gtk_main_do_event () from /tmp/.mount_InkscasQtLFC/usr/lib/libgtk-3.so.0
#23 0x00007fffee70a765 in ?? () from /tmp/.mount_InkscasQtLFC/usr/lib/libgdk-3.so.0
#24 0x00007fffee73af92 in ?? () from /tmp/.mount_InkscasQtLFC/usr/lib/libgdk-3.so.0
#25 0x00007ffff5a6f417 in g_main_context_dispatch () from /tmp/.mount_InkscasQtLFC/usr/lib/libglib-2.0.so.0
#26 0x00007ffff5a6f650 in ?? () from /tmp/.mount_InkscasQtLFC/usr/lib/libglib-2.0.so.0
#27 0x00007ffff5a6f6dc in g_main_context_iteration () from /tmp/.mount_InkscasQtLFC/usr/lib/libglib-2.0.so.0
#28 0x00007ffff1875e3d in g_application_run () from /tmp/.mount_InkscasQtLFC/usr/lib/libgio-2.0.so.0
#29 0x00007ffff3ab2b97 in __libc_start_main () from /tmp/.mount_InkscasQtLFC/lib/x86_64-linux-gnu/libc.so.6
#30 0x00007ffff7bd15ea in ?? ()
---Type <return> to continue, or q <return> to quit---
#31 0x00007fffffffd608 in ?? ()
#32 0x000000000000001c in ?? ()
#33 0x0000000000000001 in ?? ()
#34 0x00007fffffffdca7 in ?? ()
#35 0x0000000000000000 in ?? ()
```![b.svg](/uploads/999b6bf7e201eef98b205f78f7534a74/b.svg)