[Wayland-bugs] [Bug 745289] New: wayland: do not use g_error() on connection errors
gtk+ (GNOME Bugzilla)
bugzilla at gnome.org
Fri Feb 27 06:50:41 PST 2015
https://bugzilla.gnome.org/show_bug.cgi?id=745289
Bug ID: 745289
Summary: wayland: do not use g_error() on connection errors
Classification: Platform
Product: gtk+
Version: unspecified
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: Backend: Wayland
Assignee: gtk-bugs at gtk.org
Reporter: ofourdan at redhat.com
QA Contact: gtk-bugs at gtk.org
CC: rob at robster.org.uk, wayland-bugs at lists.freedesktop.org
GNOME version: ---
Created attachment 298092
--> https://bugzilla.gnome.org/attachment.cgi?id=298092&action=edit
Patch to fix the issue.
When the Wayland compositor vanishes, all applications connected will receive a
SIGPIPE as soon as they try to use wl_display_dispatch().
Do not use g_error() to terminate the applications when this occurs, g_error()
means an error in the application while here it's not truly the case:
https://developer.gnome.org/glib/stable/glib-Message-Logging.html#g-error
"[...] This function will result in a core dump; don't use it for errors you
expect. Using this function indicates a bug in your program, i.e. an assertion
failure."
This can lead automated bug reporting tools to automatically log bugs for
various components even though this is perfectly normal (at least not a bug in
the components)...
So instead of g_error(), use g_printerr() and exit() just like other backend do
in such case (e.g. Broadway backend).
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150227/2f56ffc6/attachment.html>
More information about the wayland-bugs
mailing list