g_warning on layer deletion

Bug #167070 reported by Sgiunchi
2
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Mental-users

Bug Description

With the attached svg, when i try to delete layer
"#layer8", inkscape crashes
inkscape v 1.42 on ubuntu breezy 5.10

Stefano

this is the gdb output:

stefano@nbstefano:~$ gdb inkscape
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General
Public License, and you are
welcome to change it and/or distribute copies of it
under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type
"show warranty" for details.
This GDB was configured as "i486-linux-gnu"...(no
debugging symbols found)
Using host libthread_db library
"/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) run
Starting program: /usr/bin/inkscape
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to
quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1223321920 (LWP 9888)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to
quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation
fault.
[Switching to Thread -1223321920 (LWP 9888)]
---Type <return> to continue, or q <return> to
quit---
0x080acf51 in
__gnu_cxx::__common_pool_policy<__gnu_cxx::__pool,
true>::_S_initialize_once ()
(gdb) bt
#0 0x080acf51 in
__gnu_cxx::__common_pool_policy<__gnu_cxx::__pool,
true>::_S_initialize_once ()
#1 0x081fb850 in Gtk::manage<Gtk::Entry> ()
#2 0xb7e470c5 in (anonymous
namespace)::SignalProxy_CellData::gtk_callback
()
   from /usr/lib/libgtkmm-2.4.so.1
#3 0xb79aa36d in gtk_cell_view_get_type ()
from /usr/lib/libgtk-x11-2.0.so.0
#4 0xb79aa3e3 in gtk_cell_view_get_type ()
from /usr/lib/libgtk-x11-2.0.so.0
#5 0xb79ab536 in gtk_cell_view_get_size_of_row
()
   from /usr/lib/libgtk-x11-2.0.so.0
#6 0xb79cbb4d in gtk_combo_box_set_model ()
from /usr/lib/libgtk-x11-2.0.so.0
#7 0xb7ed8bd6 in
Gtk::Widget_Class::size_request_callback ()
   from /usr/lib/libgtkmm-2.4.so.1
#8 0xb7548315 in
g_cclosure_marshal_VOID__BOXED ()
   from /usr/lib/libgobject-2.0.so.0
#9 0xb753bd75 in g_cclosure_new_swap ()
from /usr/lib/libgobject-2.0.so.0
#10 0xb753c3a8 in g_closure_invoke ()
from /usr/lib/libgobject-2.0.so.0
#11 0xb754a769 in g_signal_stop_emission ()
from /usr/lib/libgobject-2.0.so.0
#12 0xb754c150 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#13 0xb754f4f0 in g_signal_emit_by_name ()
from /usr/lib/libgobject-2.0.so.0
#14 0xb7aa328d in
gtk_size_group_remove_widget ()
   from /usr/lib/libgtk-x11-2.0.so.0
#15 0xb7aa3629 in
_gtk_size_group_compute_requisition ()
   from /usr/lib/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to
quit---
#16 0xb7b3c0b8 in gtk_widget_size_request ()
from /usr/lib/libgtk-x11-2.0.so.0
#17 0xb7a20cdb in gtk_hbox_new ()
from /usr/lib/libgtk-x11-2.0.so.0
#18 0xb7edd19d in Gtk::Widget::on_size_request
()
   from /usr/lib/libgtkmm-2.4.so.1
#19 0xb7ed8bed in
Gtk::Widget_Class::size_request_callback ()
   from /usr/lib/libgtkmm-2.4.so.1
#20 0xb7548315 in
g_cclosure_marshal_VOID__BOXED ()
   from /usr/lib/libgobject-2.0.so.0
#21 0xb753bd75 in g_cclosure_new_swap ()
from /usr/lib/libgobject-2.0.so.0
#22 0xb753c3a8 in g_closure_invoke ()
from /usr/lib/libgobject-2.0.so.0
#23 0xb754a769 in g_signal_stop_emission ()
from /usr/lib/libgobject-2.0.so.0
#24 0xb754c150 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#25 0xb754f4f0 in g_signal_emit_by_name ()
from /usr/lib/libgobject-2.0.so.0
#26 0xb7aa328d in
gtk_size_group_remove_widget ()
   from /usr/lib/libgtk-x11-2.0.so.0
#27 0xb7aa3629 in
_gtk_size_group_compute_requisition ()
   from /usr/lib/libgtk-x11-2.0.so.0
#28 0xb7b3c0b8 in gtk_widget_size_request ()
from /usr/lib/libgtk-x11-2.0.so.0
#29 0xb7a20cdb in gtk_hbox_new ()
from /usr/lib/libgtk-x11-2.0.so.0
#30 0xb7548315 in
g_cclosure_marshal_VOID__BOXED ()
   from /usr/lib/libgobject-2.0.so.0
#31 0xb753bd75 in g_cclosure_new_swap ()
from /usr/lib/libgobject-2.0.so.0
#32 0xb753c3a8 in g_closure_invoke ()
from /usr/lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to
quit---
#33 0xb754a769 in g_signal_stop_emission ()
from /usr/lib/libgobject-2.0.so.0
#34 0xb754c150 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#35 0xb754f4f0 in g_signal_emit_by_name ()
from /usr/lib/libgobject-2.0.so.0
#36 0xb7aa328d in
gtk_size_group_remove_widget ()
   from /usr/lib/libgtk-x11-2.0.so.0
#37 0xb7aa3629 in
_gtk_size_group_compute_requisition ()
   from /usr/lib/libgtk-x11-2.0.so.0
#38 0xb7b3c0b8 in gtk_widget_size_request ()
from /usr/lib/libgtk-x11-2.0.so.0
#39 0xb7b3830f in gtk_vbox_new ()
from /usr/lib/libgtk-x11-2.0.so.0
#40 0xb7548315 in
g_cclosure_marshal_VOID__BOXED ()
   from /usr/lib/libgobject-2.0.so.0
#41 0xb753bd75 in g_cclosure_new_swap ()
from /usr/lib/libgobject-2.0.so.0
#42 0xb753c3a8 in g_closure_invoke ()
from /usr/lib/libgobject-2.0.so.0
#43 0xb754a769 in g_signal_stop_emission ()
from /usr/lib/libgobject-2.0.so.0
#44 0xb754c150 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#45 0xb754f4f0 in g_signal_emit_by_name ()
from /usr/lib/libgobject-2.0.so.0
#46 0xb7aa328d in
gtk_size_group_remove_widget ()
   from /usr/lib/libgtk-x11-2.0.so.0
#47 0xb7aa3629 in
_gtk_size_group_compute_requisition ()
   from /usr/lib/libgtk-x11-2.0.so.0
#48 0xb7b3c0b8 in gtk_widget_size_request ()
from /usr/lib/libgtk-x11-2.0.so.0
#49 0xb79f59f2 in gtk_event_box_set_above_child
()
   from /usr/lib/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to
quit---
#50 0xb7548315 in
g_cclosure_marshal_VOID__BOXED ()
   from /usr/lib/libgobject-2.0.so.0
#51 0xb753bd75 in g_cclosure_new_swap ()
from /usr/lib/libgobject-2.0.so.0
#52 0xb753c3a8 in g_closure_invoke ()
from /usr/lib/libgobject-2.0.so.0
#53 0xb754a769 in g_signal_stop_emission ()
from /usr/lib/libgobject-2.0.so.0
#54 0xb754c150 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#55 0xb754f4f0 in g_signal_emit_by_name ()
from /usr/lib/libgobject-2.0.so.0
#56 0xb7aa328d in
gtk_size_group_remove_widget ()
   from /usr/lib/libgtk-x11-2.0.so.0
#57 0xb7aa3629 in
_gtk_size_group_compute_requisition ()
   from /usr/lib/libgtk-x11-2.0.so.0
#58 0xb7b3c0b8 in gtk_widget_size_request ()
from /usr/lib/libgtk-x11-2.0.so.0
#59 0xb7a20cdb in gtk_hbox_new ()
from /usr/lib/libgtk-x11-2.0.so.0
#60 0xb7548315 in
g_cclosure_marshal_VOID__BOXED ()
   from /usr/lib/libgobject-2.0.so.0
#61 0xb753bd75 in g_cclosure_new_swap ()
from /usr/lib/libgobject-2.0.so.0
#62 0xb753c3a8 in g_closure_invoke ()
from /usr/lib/libgobject-2.0.so.0
#63 0xb754a769 in g_signal_stop_emission ()
from /usr/lib/libgobject-2.0.so.0
#64 0xb754c150 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#65 0xb754f4f0 in g_signal_emit_by_name ()
from /usr/lib/libgobject-2.0.so.0
#66 0xb7aa328d in
gtk_size_group_remove_widget ()
   from /usr/lib/libgtk-x11-2.0.so.0
#67 0xb7aa3629 in
_gtk_size_group_compute_requisition ()
---Type <return> to continue, or q <return> to
quit---
   from /usr/lib/libgtk-x11-2.0.so.0
#68 0xb7b3c0b8 in gtk_widget_size_request ()
from /usr/lib/libgtk-x11-2.0.so.0
#69 0xb7b4c399 in
gtk_window_reshow_with_initial_size ()
   from /usr/lib/libgtk-x11-2.0.so.0
#70 0xb7548315 in
g_cclosure_marshal_VOID__BOXED ()
   from /usr/lib/libgobject-2.0.so.0
#71 0xb753bd75 in g_cclosure_new_swap ()
from /usr/lib/libgobject-2.0.so.0
#72 0xb753c3a8 in g_closure_invoke ()
from /usr/lib/libgobject-2.0.so.0
#73 0xb754a769 in g_signal_stop_emission ()
from /usr/lib/libgobject-2.0.so.0
#74 0xb754c150 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#75 0xb754f4f0 in g_signal_emit_by_name ()
from /usr/lib/libgobject-2.0.so.0
#76 0xb7aa328d in
gtk_size_group_remove_widget ()
   from /usr/lib/libgtk-x11-2.0.so.0
#77 0xb7aa3629 in
_gtk_size_group_compute_requisition ()
   from /usr/lib/libgtk-x11-2.0.so.0
#78 0xb7b3c0b8 in gtk_widget_size_request ()
from /usr/lib/libgtk-x11-2.0.so.0
#79 0xb7b4d540 in _gtk_window_constrain_size ()
   from /usr/lib/libgtk-x11-2.0.so.0
#80 0xb7b4de0c in gtk_window_get_position ()
from /usr/lib/libgtk-x11-2.0.so.0
#81 0xb7547ab3 in
g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#82 0xb753bd75 in g_cclosure_new_swap ()
from /usr/lib/libgobject-2.0.so.0
#83 0xb753c3a8 in g_closure_invoke ()
from /usr/lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to
quit---
#84 0xb754ac9f in g_signal_stop_emission ()
from /usr/lib/libgobject-2.0.so.0
#85 0xb754c150 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#86 0xb754c4c3 in g_signal_emit ()
from /usr/lib/libgobject-2.0.so.0
#87 0xb79d1643 in gtk_container_check_resize ()
   from /usr/lib/libgtk-x11-2.0.so.0
#88 0xb79d16b6 in gtk_container_check_resize ()
   from /usr/lib/libgtk-x11-2.0.so.0
#89 0xb74d1750 in g_child_watch_add ()
from /usr/lib/libglib-2.0.so.0
#90 0xb74cf4ee in g_main_context_dispatch ()
from /usr/lib/libglib-2.0.so.0
#91 0xb74d24f6 in g_main_context_check ()
from /usr/lib/libglib-2.0.so.0
#92 0xb74d27e3 in g_main_loop_run ()
from /usr/lib/libglib-2.0.so.0
#93 0xb7a58e65 in gtk_main ()
from /usr/lib/libgtk-x11-2.0.so.0
#94 0xb7e7fc95 in Gtk::Main::run_impl ()
from /usr/lib/libgtkmm-2.4.so.1
#95 0xb7e7fb86 in Gtk::Main::run ()
from /usr/lib/libgtkmm-2.4.so.1
#96 0x0806a612 in ?? ()
#97 0x0815208d in
__gnu_cxx::__common_pool_policy<__gnu_cxx::__pool,
true>::_S_initialize_once ()
#98 0x08069f4e in ?? ()
#99 0xb71c0ea2 in __libc_start_main ()
from /lib/tls/i686/cmov/libc.so.6
#100 0x08069e01 in ?? ()
(gdb) quit
The program is running. Exit anyway? (y or n) y
stefano@nbstefano:~$

Revision history for this message
Sgiunchi (sgiunchi) wrote :
Revision history for this message
Rwst (rwst) wrote :

I confirm there is a problem with CVS, too, although I don't get a crash
immediately.
After choosing #layer8 and deleting it with the menu entry, a nameless
layer appears in the layer menu.
Choosing that will give

** (inkscape:14465): CRITICAL **: void
SPDesktop::setCurrentLayer(SPObject*): assertion `currentRoot() == object
|| currentRoot()->isAncestorOf(object)' failed

which is as good as a crash.

Revision history for this message
Rwst (rwst) wrote :

thanks for the report. this is surprisingly easy to reproduce:
1. start inkscape
2. add layer, switch to it
3. Layer > Delete
the layer menu will now have an empty entry, and switching to it triggers
the said assert.
a quick workaround would be to delete from xml editor where this appears
to be handled correctly

assigned to mental, since it is no SPDesktop C++ification issue, as I
first thought

Revision history for this message
Rwst (rwst) wrote :

patch 1344138 fixes the issue of presentation of a deleted
layer in the layer selector.

if you cannot compile with this patch to test it you would
have to wait until it's applied to cvs, and get a binary snapshot.
if you test it somehow please report here of the outcome.

thanks for the bug report

Revision history for this message
Peter Moulder (pjrm) wrote :

I've applied the "delete before switching layers" patch,
which is enough to fix the bug in the simple case described
below.
I'll leave this open just because I don't know for sure
whether this fixes it in general or not.

Revision history for this message
Rwst (rwst) wrote :

well pjrm, we don't know if *any* bug is fixed in general or not, so I'll
close this bug now. please reopen if you find a case that shows the patch
was invalid.

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.