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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]
     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.
_______________________________________________
wayland-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-bugs

Reply via email to