Created attachment 5705 fix-removing-gsources.patch On startup, xfce4-netload-plugin spills out the following CRITICAL GLib Error: GLib-CRITICAL **: Source ID 5 was not found when attempting to remove it This patch makes it check to see if a GSource exists before destroying it, since any GSource may be destroyed early in the main event loop if its dispatch callback returns FALSE.
That 4 identical chunks change calls for a function, no ? :)
Created attachment 5706 use a function to remove the gsource How about this ?
Yes, I guess that should work too ;-)
But you forgot the return type.
oh, right. anyway, i dont have write access to netload's repo, and i realized it wasnt converted to build as a module or install files in panel/plugins dirs like every other plugin.. mike, since you're the maintainer, any opinion on this ? i'll gladly cherrypick some patches and make a maintainance release if i can get write to git/releases and you dont plan to work on that soon...
actually i never triggered that bug, but lets see. glib actually does exactly this for you while removing a source: https://git.gnome.org/browse/glib/tree/glib/gmain.c?h=glib-2-32#n1845 sooo, wontfix since it does not sound logical to do the following check twice. g_source_remove(guint tag) { GSource *source; source = g_main_context_find_source_by_id(NULL, tag); if (source) { g_source_destroy(source); } }