Comment 8 for bug 37624

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