udda / multiload-ng

Modern graphical system monitor for any panel
http://udda.github.io/multiload-ng
GNU General Public License v2.0
147 stars 22 forks source link

frequent runtime messages #76

Open jonorthwash opened 3 years ago

jonorthwash commented 3 years ago

I get multiple messages a second logged to .xsession-errors, which quickly grows to several GB in size and fills up my drive.

(multiload-ng-systray:2037938): multiload-ng-CRITICAL **: 14:26:00.753: systray_graph_update_cb: assertion 'gtk_status_icon_is_embedded(status_icons[g->id])' failed

(multiload-ng-systray:2037938): multiload-ng-CRITICAL **: 14:26:00.830: systray_graph_update_cb: assertion 'gtk_status_icon_is_embedded(status_icons[g->id])' failed

(multiload-ng-systray:2037938): multiload-ng-CRITICAL **: 14:26:01.738: systray_graph_update_cb: assertion 'gtk_status_icon_is_embedded(status_icons[g->id])' failed

(multiload-ng-systray:2037938): multiload-ng-CRITICAL **: 14:26:01.738: systray_graph_update_cb: assertion 'gtk_status_icon_is_embedded(status_icons[g->id])' failed

This is revision 743885da84474bfffc5f5505c0d1a7160de6afef. I will pull the most recent revision, recompile, and see if it continues, which appears to be the latest revision.

kreddkrikk commented 1 year ago

This is apparently because gtk_status_icon_is_embedded has been deprecated since GTK 3.14, so always returns false when GTK >= 3.14. The macros used to prevent the deprecation messages for this function work, but do not prevent the assertion messages you see because gtk_status_icon_is_embedded is wrapped inside g_return_fail. g_return_fail goes ahead and prints its own assertion message since the deprecated gtk_status_icon_is_embedded always returns false:

    G_GNUC_BEGIN_IGNORE_DEPRECATIONS
    g_return_if_fail (gtk_status_icon_is_embedded(status_icons[g->id]));
    guint icon_size = gtk_status_icon_get_size(status_icons[g->id]);
    G_GNUC_END_IGNORE_DEPRECATIONS

The obvious solution is to simply use an if clause instead of g_return_if_fail.