After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756439 - Regression: Critical warning "g_app_launch_context_get_display: assertion 'G_IS_APP_INFO (info)' failed"
Regression: Critical warning "g_app_launch_context_get_display: assertion 'G_...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 754983
Blocks:
 
 
Reported: 2015-10-12 14:07 UTC by Olivier Fourdan
Modified: 2015-10-13 06:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for glib/gio (895 bytes, patch)
2015-10-12 14:18 UTC, Olivier Fourdan
none Details | Review
Patch for gdk/x11 (1.44 KB, patch)
2015-10-12 14:20 UTC, Olivier Fourdan
accepted-commit_now Details | Review

Description Olivier Fourdan 2015-10-12 14:07:55 UTC
Description:

Glib critical warning when clicking on URI after git commit ecb0e777

g_app_launch_context_get_display: assertion 'G_IS_APP_INFO (info)' failed

Steps to reproduce:

1. Using X11 backend
2. run "gtk3-demo --run=links"
3. Click on the "text" link in the dialog

Additional info:

g_app_launch_context_get_display() expects the given GAppInfo to be non-null whereas we pass NULL.

This can be addressed at two different levels:

1. in gio, no backend actually use GAppInfo for get_display() so there is no reason got gio to check for GAppInfo to be non-null.

2. In gdk X11 backend, by not using g_app_launch_context_get_display()

Will post two different patches to do either 1. or 2. so we can choose what's best (or come up with another solution maybe)
Comment 1 Olivier Fourdan 2015-10-12 14:18:51 UTC
Created attachment 313121 [details] [review]
Patch for glib/gio

That's for option #1 (allow for NULL GAppInfo in g_app_launch_context_get_display())
Comment 2 Olivier Fourdan 2015-10-12 14:20:10 UTC
Created attachment 313122 [details] [review]
Patch for gdk/x11

That's for option #2 (do not use g_app_launch_context_get_display() but gdk_display_get_name() instead)
Comment 3 Olivier Fourdan 2015-10-12 14:20:55 UTC
Note, it's either attachment 313121 [details] [review] for glib *or*  attachment 313122 [details] [review] for gtk+, *not* both.
Comment 4 Matthias Clasen 2015-10-12 23:52:50 UTC
Review of attachment 313122 [details] [review]:

This looks fine to me
Comment 5 Olivier Fourdan 2015-10-13 06:44:01 UTC
attachment 313122 [details] [review] pushed as commit 4398e12 GdkAppLaunchContext: Use the display name for X11