Invalid 'Consider using g_application_run()' runtime warning
Trying to run /usr/libexec/evolution-data-server/evolution-alarm-notify
when one is already running shows a runtime warning:
(evolution-alarm-notify:6444): GLib-GIO-WARNING **: 18:33:46.329:
Your application did not unregister from D-Bus before destruction.
Consider using g_application_run().
- Which is misleading, because when you look into the code, then the
g_application_run()
is used there:
g_application_register (G_APPLICATION (alarm_notify), NULL, &error);
if (error != NULL) {
g_printerr ("%s\n", error->message);
g_error_free (error);
g_object_unref (alarm_notify);
exit (EXIT_FAILURE);
}
if (g_application_get_is_remote (G_APPLICATION (alarm_notify))) {
g_object_unref (alarm_notify);
return 0;
}
#ifdef G_OS_UNIX
g_unix_signal_add_full (
G_PRIORITY_DEFAULT, SIGTERM,
handle_term_signal, alarm_notify, NULL);
#endif
exit_status = g_application_run (G_APPLICATION (alarm_notify), argc, argv);
g_object_unref (alarm_notify);
The thing is that when the application notices it is already running it simply quits. That's the correct thing to do, is it not?
-
I guess the unregistering from D-Bus is also wrong, because the g_application_register() should fail in this case, at least according to the developer documentation of that function.
-
That this "hint" is a WARNING is also kinda bad idea, because if it's only a hint, which the word "consider" suggests, then having the warning sensitive to
fatal-warnings
makes things hard to use for end users (not for developers), if they use it for whatever reason.
I've currently installed:
glib2-2.60.6-1.fc30.x86_64
evolution-data-server-3.32.4-1.fc30.x86_64