GNOME Bugzilla – Bug 642490
notify_desktop_launch() "g_variant_new_bytestring: assertion `string != NULL' failed" warnings
Last modified: 2011-02-16 18:59:20 UTC
The issue happen on glib 2.28.0 and is due to the patch from https://bugzilla.gnome.org/show_bug.cgi?id=641395 which does " g_variant_builder_add (&extras_variant, "{sv}", "origin-prgname", g_variant_new_bytestring (g_get_prgname ()));" or g_get_prgname () can return NULL if neither gtk_main() or g_get_prgname() have been called it leads to those warnings to be displayed ""(process:19746): GLib-CRITICAL **: g_variant_new_bytestring: assertion `string != NULL' failed (process:19746): GLib-CRITICAL **: g_variant_new_variant: assertion `value != NULL' failed (process:19746): GLib-CRITICAL **: g_variant_get_type: assertion `value != NULL' failed (process:19746): GLib-CRITICAL **: g_variant_type_is_subtype_of: assertion `g_variant_type_check (type)' failed (process:19746): GLib-CRITICAL **: g_variant_builder_add_value: assertion `!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed (process:19746): GLib-CRITICAL **: g_variant_builder_end: assertion `GVSB(builder)->offset >= GVSB(builder)->min_items' failed (process:19746): GLib-CRITICAL **: g_variant_get_type: assertion `value != NULL' failed (process:19746): GLib-CRITICAL **: g_variant_type_is_subtype_of: assertion `g_variant_type_check (type)' failed (process:19746): GLib-CRITICAL **: g_variant_builder_add_value: assertion `!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed"
the warning comes from calling g_app_info_launch() from an example program using glib and gio but not gtk
Created attachment 181037 [details] [review] gdesktopappinfo: Handle g_get_prgname() being NULL Reported-By: Sebastien Bacher <seb128@ubuntu.com>
Review of attachment 181037 [details] [review]: Looks ok; please cherry-pick to 2.28 as well