The crash of the plugin also kills the xfce4-panel process it's been loaded into. It occurs due to not checking the return value of xfce_panel_plugin_lookup_rc_file() for NULL in the function stopwatch_plugin_load() which is called during startup of the plugin. This error occurs if no configuration file for the panel-plugin instance is present and xfce_panel_plugin_lookup_rc_file() therefore does return NULL. The affected and tested version of the plugin is the stable 0.2.0. This bug has also been reported in the Gentoo bugtracker (they don't apply any patches to this package) at https://bugs.gentoo.org/show_bug.cgi?id=339302 The below patch eliminates the problem (and makes a small part of the source more readable): diff -urw a/panel-plugin/stopwatch.c b/panel-plugin/stopwatch.c --- a/panel-plugin/stopwatch.c 2009-07-28 00:47:25.000000000 +0200 +++ b/panel-plugin/stopwatch.c 2010-10-01 05:23:34.611694903 +0200 @@ -582,7 +582,11 @@ g_return_if_fail (panel_plugin != NULL); _tmp0_ = NULL; _tmp1_ = NULL; - rc = (_tmp1_ = xfce_rc_simple_open (_tmp0_ = xfce_panel_plugin_lookup_rc_file (panel_plugin), TRUE), _tmp0_ = (g_free (_tmp0_), NULL), _tmp1_); + _tmp0_ = xfce_panel_plugin_lookup_rc_file (panel_plugin); + if (!_tmp0_) + return; + rc = xfce_rc_simple_open (_tmp0_, TRUE); + g_free (_tmp0_); elapsed = (my_time_val_init_zero (&_tmp2_), _tmp2_); sscanf (xfce_rc_read_entry (rc, "elapsed_sec", "0"), "%ld", &elapsed.tv_sec); sscanf (xfce_rc_read_entry (rc, "elapsed_usec", "0"), "%ld", &elapsed.tv_usec);
Created attachment 3122 The same patch as in Comment #0, but as attachment. Attaching it for convinience here, it's pain to copy and paste from bugzilla. It would be nice to get some upstream eyes on this, before I go and apply it in our package at Portage. Thanks!
Hey, thanks for the bug report. Unfortunately, you've patched an autogenerated file: stopwatch.c is generated by valac from stopwatch.vala. This also explains why the c code is so ugly, by the way. You should probably patch stopwatch.vala instead and regenerate stopwatch.c from that. -Diego
Created attachment 3123 patching .vala instead of .c Thank you, that explains it. I've never heard of Vala before and didn't bother to look into the respective file. However I am not able to install xfce4-vala through portage due to a restriction placed by Gentoo because the packet seems outdated. So I cannot verify whether my patching the file works. I'd appreciate it, if you gave it a try.
(In reply to comment #3) > Created attachment 3123 > patching .vala instead of .c > > Thank you, that explains it. I've never heard of Vala before and didn't bother > to look into the respective file. However I am not able to install xfce4-vala > through portage due to a restriction placed by Gentoo because the packet seems > outdated. So I cannot verify whether my patching the file works. > I'd appreciate it, if you gave it a try. Sure, the attachment looks reasonable, and I'll give it a try when I get a minute. Thanks again.
This project has been archived, so we are closing related bugs