Exception when trying "Add to panel"

Bug #37624 reported by Bartosz Mosica
32
Affects Status Importance Assigned to Milestone
libbonobo (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

When I right click on gnome-panel and select "Add to panel" I got
message that application generated exception and will be closed.
Restarting gnome-panel don't change anything. I upgraded from Ubuntu Breeze

Steps to reproduce the crash:
1. Right click on gnome-panel
2. Select "Add to panel"

Expected Results:
Should show component to add applets to panel.

How often does this happen?
Always

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. What locale do you use? Could you get a backtrace of the crash with gnome-panel-dbg installed?
- run "gdb -p $(pidof gnome-panel)"
- try opening the dialog
- type "thread apply all bt" to the gdb prompt

then copy that to a comment

Changed in gnome-panel:
assignee: nobody → desktop-bugs
status: Unconfirmed → Needs Info
Revision history for this message
Bartosz Mosica (wilow) wrote :
Download full text (3.6 KiB)

Sorry for delay.
I'm using locale pl_PL.

Here is info from debugger:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1223424320 (LWP 7169)]
0xb77b5b78 in g_markup_escape_text () from /usr/lib/libglib-2.0.so.0
(gdb) thread apply all bt

Thread 2 (Thread -1230206032 (LWP 7175)):
#0 0xb7637e0a in poll () from /lib/tls/libc.so.6
#1 0xb77b46e8 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#2 0xb77b4bb8 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#3 0xb7cb770e in link_thread_io_context () from /usr/lib/libORBit-2.so.0
#4 0xb77cd472 in g_static_private_free () from /usr/lib/libglib-2.0.so.0
#5 0xb7c731ce in start_thread () from /lib/tls/libpthread.so.0
#6 0xb76418fe in clone () from /lib/tls/libc.so.6

Thread 1 (Thread -1223424320 (LWP 7169)):
#0 0xb77b5b78 in g_markup_escape_text () from /usr/lib/libglib-2.0.so.0
#1 0xb77b80b9 in g_markup_vprintf_escaped () from /usr/lib/libglib-2.0.so.0
#2 0xb77b8216 in g_markup_printf_escaped () from /usr/lib/libglib-2.0.so.0
#3 0x080a1a0b in panel_addto_make_text (name=<value optimized out>,
    desc=0x865ecd8 "Narzędzie montujące lokalne dyski i urządzenia")
    at /build/buildd/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:215
#4 0x080a1c98 in panel_addto_append_item (dialog=<value optimized out>,
    model=0x84f6800, applet=0x865ec38)
    at /build/buildd/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:443
#5 0x080a210e in panel_addto_present_applets (dialog=0x863f330)
    at /build/buildd/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:485
#6 0x080a41a2 in panel_addto_present (item=0x8634168, panel_widget=0x8159808)
    at /build/buildd/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:1497
#7 0xb7827423 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0
#8 0xb781b79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#9 0xb782a4de in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#10 0xb782bae9 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#11 0xb782be59 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#12 0xb7b985ad in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#13 0xb7ac51af in gtk_menu_shell_activate_item () from /usr/lib/libgtk-x11-2.0.so.0
#14 0xb7ac5481 in gtk_menu_shell_activate_item () from /usr/lib/libgtk-x11-2.0.so.0
#15 0xb7abbc34 in gtk_menu_reorder_child () from /usr/lib/libgtk-x11-2.0.so.0
#16 0xb7ab6540 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0
#17 0xb781b16f in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#18 0xb781b79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#19 0xb782a9d8 in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#20 0xb782b856 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#21 0xb782be59 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#22 0xb7b9878f in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#23 0xb7ab4cbd in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#24 0xb7ab50cb in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#25 ...

Read more...

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you get a backtrace with libglib2.0-0-dbg installed?

Revision history for this message
Bartosz Mosica (wilow) wrote :
Download full text (5.3 KiB)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1222863168 (LWP 5475)]
IA__g_markup_parse_context_get_position (context=0x871d000, line_number=0x1e,
    char_number=0x14) at gmarkup.c:1866
1866 gmarkup.c: Nie ma takiego pliku ani katalogu.
        in gmarkup.c
(gdb) threa apply all bt

Thread 2 (Thread -1229587536 (LWP 5567)):
#0 0xb76c0e0a in poll () from /lib/tls/libc.so.6
#1 0xb783d6e8 in g_main_context_iterate (context=0x82a7660, block=1, dispatch=1,
    self=0x8121388) at gmain.c:2553
#2 0xb783dbb8 in IA__g_main_loop_run (loop=0x82a0590) at gmain.c:2722
#3 0xb7d4070e in link_thread_io_context () from /usr/lib/libORBit-2.so.0
#4 0xb7856472 in g_thread_cleanup (data=0x8121388) at gthread.c:552
#5 0xb7cfc1ce in start_thread () from /lib/tls/libpthread.so.0
#6 0xb76ca8fe in clone () from /lib/tls/libc.so.6

Thread 1 (Thread -1222863168 (LWP 5475)):
#0 IA__g_markup_parse_context_get_position (context=0x871d000, line_number=0x1e,
    char_number=0x14) at gmarkup.c:1866
#1 0x086e89d0 in ?? ()
#2 0x0871cfff in ?? ()
#3 0x00000001 in ?? ()
#4 0xb7854b22 in IA__g_string_insert_len (string=0x871d000, pos=30,
    val=0x86c6176 "XNarzędzie montujące lokalne dyski i urządzeniaX", len=-1081148972)
    at gstring.c:484
#5 0xb78410b9 in IA__g_markup_vprintf_escaped (
    format=0x80b9b44 "<span weight=\"bold\">%s</span>\n%s",
    args=0xbf8efa14 "\220\036k\bř\036k\b Zk\bX\036k\b Zk\b\210ú\216ż\230\034\n\bŔ^O\blú\216ż") at gstring.h:125
#6 0xb7841216 in IA__g_markup_vprintf_escaped (
    format=0x80b9b44 "<span weight=\"bold\">%s</span>\n%s",
    args=0x86b1e90 "Narzędzie do montowania dysków") at gmarkup.c:2207
#7 0x080a1a0b in panel_addto_make_text (name=<value optimized out>,
    desc=0xb7cedbb8 "Čč,")
    at /build/buildd/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:215
#8 0x080a1c98 in panel_addto_append_item (dialog=<value optimized out>,
    model=0x84f5ec0, applet=0x84f5ec0)
    at /build/buildd/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:443
#9 0x080a210e in panel_addto_present_applets (dialog=0x8659f48)
    at /build/buildd/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:485
#10 0x080a41a2 in panel_addto_present (item=0x8549e78, panel_widget=0x81598f0)
    at /build/buildd/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:1497
#11 0xb78b0423 in IA__g_cclosure_marshal_VOID__VOID (closure=0x85be0c0,
    return_value=0x0, n_param_values=1, param_values=0xbf8efdfc,
---Type <return> to continue, or q <return> to quit---
    invocation_hint=0xbf8efcec, marshal_data=0x80a35ca) at gmarshal.c:77
#12 0xb78a479f in IA__g_closure_invoke (closure=0x85be0c0, return_value=0x871d000,
    n_param_values=141676544, param_values=0x871d000, invocation_hint=0x871d000)
    at gclosure.c:490
#13 0xb78b34de in signal_emit_unlocked_R (node=0x8549e78, detail=3079252080,
    instance=0xb789a600, emission_return=0x0, instance_and_params=0xbf8efdfc)
    at gbsearcharray.h:169
#14 0xb78b4ae9 in IA__g_signal_emit_valist (instance=0x8549e78, signal_id=168, detail=0,
    var_args=<value optimized out>) at gsignal.c:662
#15 0xb78b4e59 in IA__g_signal_emit_valist (instance=0x854...

Read more...

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you get a backtrace with http://people.ubuntu.com/~seb128/debug/gnome-panel/gnome-panel_2.14.1-0ubuntu6_i386.deb installed ? The -dbg package has the interesting value optimized

Revision history for this message
Bartosz Mosica (wilow) wrote :
Download full text (5.2 KiB)

Yes, here it is:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1223686464 (LWP 6452)]
0xb7775c18 in IA__g_markup_escape_text (
    text=0x8696000 <Address 0x8696000 out of bounds>, length=30) at gmarkup.c:1890
1890 gmarkup.c: Nie ma takiego pliku ani katalogu.
        in gmarkup.c
(gdb) thread apply all bt

Thread 2 (Thread -1242825808 (LWP 6463)):
#0 0xb75f7e0a in poll () from /lib/tls/libc.so.6
#1 0xb7774788 in g_main_context_iterate (context=0x8288200, block=1, dispatch=1,
    self=0x8235f30) at gmain.c:2849
#2 0xb7774c58 in IA__g_main_loop_run (loop=0x82810b0) at gmain.c:2751
#3 0xb7c7770e in link_thread_io_context () from /usr/lib/libORBit-2.so.0
#4 0xb778d582 in g_thread_create_proxy (data=0x8235f30) at gthread.c:582
#5 0xb7c331ce in start_thread () from /lib/tls/libpthread.so.0
#6 0xb76018fe in clone () from /lib/tls/libc.so.6

Thread 1 (Thread -1223686464 (LWP 6452)):
#0 0xb7775c18 in IA__g_markup_escape_text (
    text=0x8696000 <Address 0x8696000 out of bounds>, length=30) at gmarkup.c:1890
#1 0xb7778159 in IA__g_markup_vprintf_escaped (
    format=0x80cf684 "<span weight=\"bold\">%s</span>\n%s",
    args=0xbfd279d4 "đěc\bXíc\bĄ\016§ˇ \032S\bđěc\b\027") at gmarkup.c:2200
#2 0xb77782b6 in IA__g_markup_printf_escaped (
    format=0x8696000 <Address 0x8696000 out of bounds>) at gmarkup.c:2257
#3 0x080b28c9 in panel_addto_make_text (
    name=0x863ecf0 "Narzędzie do montowania dysków",
    desc=0x863ed58 "Narzędzie montujące lokalne dyski i urządzenia")
    at /home/seb128/boulot/paquets/gnome-panel/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:215
#4 0x080b2fa5 in panel_addto_append_item (dialog=0x8620a90, model=0x8531a20,
    applet=0x863ecb8)
    at /home/seb128/boulot/paquets/gnome-panel/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:443
#5 0x080b30fc in panel_addto_make_applet_model (dialog=0x8620a90)
    at /home/seb128/boulot/paquets/gnome-panel/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:485
#6 0x080b45ed in panel_addto_present_applets (dialog=0x8620a90)
    at /home/seb128/boulot/paquets/gnome-panel/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:1125
#7 0x080b5796 in panel_addto_present (item=0x8613630, panel_widget=0x8170808)
    at /home/seb128/boulot/paquets/gnome-panel/gnome-panel-2.14.1/./gnome-panel/panel-addto.c:1497
#8 0xb77e7423 in IA__g_cclosure_marshal_VOID__VOID (closure=0x8509458,
    return_value=0x0, n_param_values=1, param_values=0xbfd27d6c,
---Type <return> to continue, or q <return> to quit---
    invocation_hint=0xbfd27c5c, marshal_data=0x80b5697) at gmarshal.c:77
#9 0xb77db79f in IA__g_closure_invoke (closure=0x8509458, return_value=0x8696000,
    n_param_values=141123584, param_values=0x8696000, invocation_hint=0x8696000)
    at gclosure.c:490
#10 0xb77ea2ea in signal_emit_unlocked_R (node=0x827b030, detail=0, instance=0x8613630,
    emission_return=0x0, instance_and_params=0xbfd27d6c) at gsignal.c:2438
#11 0xb77ebb19 in IA__g_signal_emit_valist (instance=0x8613630, signal_id=168, detail=0,
    var_args=<value optimized out>) at gsignal.c:2197
#12 0xb77ebe89 in IA__g_signal_emit (instance=0x8696000, sig...

Read more...

Revision history for this message
Bartosz Mosica (wilow) wrote :

Generally I'm developer and I can try to debug it, but I need some tips about using valgrind and how to rebuild package. If you have any links it would be helpfull.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for offering to work on that. Valgrind can point incorrect memory usage by example. Install the valgrind package to get it. Then to get a log:
- gnome-session-remove gnome-panel
- valgrind --trace-children=yes gnome-panel

running it makes things much slower but is useful. Once the panel started, open the dialog to get the crash and copy the log to a comment

To edit the code
- apt-get source gnome-panel
- cd gnome-panel-2.14.1
- sudo apt-get build-dep gnome-panel
- sudo apt-get install fakeroot devscripts build-essential
- debuild
you get a the package built
- edit gnome-panel/panel-addto.c
then either:
- run "debuild binary" to get a fast package rebuild with your changes applied
or
- make && gnome-panel/gnome-panel

The function were the crash happens according to the bt:

"static char *
panel_addto_make_text (const char *name,
         const char *desc)
{
 const char *real_name;
 char *result;

 real_name = name ? name : _("(empty)");

 if (!string_empty (desc)) {
  result = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>\n%s",
        real_name, desc);
 } else {
  result = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>",
        real_name);
 }

 return result;
}"

real_name and desc seems to be correct according to the backtrace, that could be nice to have a printf before every g_markup_printf_escaped for that by example

you may want to run gnome-panel with GNOME_PANEL_DEBUG=1 set so it doesn't restart automatically if you doesn't want to

Revision history for this message
Bartosz Mosica (wilow) wrote :

Right now I have valgrind log, but as I see it is truncated, so I will make correct one soon.

I think that problem is related to some polish letters, and it can be connected with not displaying some names in menu (see attachment - menu_no_entries.png). On console gnome-panel put a lot of warnings about that:

** (gnome-panel:19770): WARNING **: Invalid input string for underscore escaping

(gnome-panel:19770): Gtk-WARNING **: Invalid input string

In function panel_addto_make_text it crash inside function g_markup_printf_escaped. When I printf variables I have such entries (here only last correct):

Name: Monitor systemu
Desc: Wskaźnik obciążenia systemu
Real_name: Monitor systemu
RESULT: <span weight="bold">Monitor systemu</span>
Wskaźnik obciążenia systemu

And it crash on such values, which don't look even strange:

Name: Narzędzie do montowania dysków
Desc: Narzędzie montujące lokalne dyski i urządzenia
Real_name: Narzędzie do montowania dysków

This is what I have right now, I will try to digg more.

Revision history for this message
Bartosz Mosica (wilow) wrote : Menu with no entries

Menu with no entries - probably because of polish letters.

On console such warnings:

(gnome-panel:19865): Gtk-WARNING **: Invalid input string

** (gnome-panel:19865): WARNING **: Invalid input string for underscore escaping

Revision history for this message
Bartosz Mosica (wilow) wrote : gnome-panel valgrind log

Valgrind log for this bug.

Revision history for this message
Sebastien Bacher (seb128) wrote :

a bunch of duplicates for Ubuntu and upstream, would be nice to fix for dapper ...

Changed in gnome-panel:
status: Needs Info → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

do you use an UTF-8 locale? do you still have the issue?

Revision history for this message
Sebastien Bacher (seb128) wrote :

I'll upload a fixed package soon

Changed in gnome-panel:
status: Confirmed → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

This upload fixes the issue:

 libbonobo (2.14.0-0ubuntu2) dapper; urgency=low
 .
   * debian/patches/server-files-gettext.patch:
     - Check whether the application used bind_textdomain_codeset() to force a
       dgettext() return encoding, and not use g_locale_to_utf8() in this case.
       fix "add to panel" dialog crasher or broken translations when using an
       utf-8 locale (Ubuntu: #37624)

Changed in libbonobo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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