From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: bug#34528: Gtk upstream bug #1280 causes crashes in IceCat and Emacs Date: Fri, 29 Mar 2019 23:47:25 -0400 Message-ID: <87muld58gn.fsf@netris.org> References: <871s456q73.fsf@dismail.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:52597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hA50O-0005Oh-QL for bug-guix@gnu.org; Fri, 29 Mar 2019 23:50:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hA50N-0002Eh-3z for bug-guix@gnu.org; Fri, 29 Mar 2019 23:50:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50839) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hA50M-0002Eb-Vt for bug-guix@gnu.org; Fri, 29 Mar 2019 23:50:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hA50M-0008Ds-Qt for bug-guix@gnu.org; Fri, 29 Mar 2019 23:50:02 -0400 In-Reply-To: <871s456q73.fsf@dismail.de> Sender: "Debbugs-submit" Resent-Message-ID: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 34454@debbugs.gnu.org, 34658@debbugs.gnu.org, 34528@debbugs.gnu.org Cc: Joshua Branson , Bradley Haggerty --=-=-= Content-Type: text/plain merge 34454 34658 34528 retitle 34454 Gtk upstream bug #1280 causes crashes in IceCat and Emacs thanks Hello all, I looked into this, and I believe all of these bugs are caused by Gtk upstream bug #1280: https://gitlab.gnome.org/GNOME/gtk/issues/1280 which is apparently fixed by the following upstream commit: https://gitlab.gnome.org/GNOME/gtk/commit/e3a1593a0984cc0156ec1892a46af8f256a64878 Here's another upstream bug report that's more obviously related to this, and upstream decided it was a duplicate with #1280: https://gitlab.gnome.org/GNOME/gtk/issues/1523 Also, here's the same bug reported for NixOS and Arch: https://github.com/NixOS/nixpkgs/issues/53697 https://bugs.archlinux.org/task/61050 I've attached a proposed patch to fix this in Guix. I'm currently testing the patch on my system to make sure it doesn't cause any problems, although I cannot reproduce this bug on my own system. If those affected by this issue would like to test this patch and report back, that would be helpful. Regards, Mark --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-UNTESTED-gnu-gtk-Add-upstream-fix-for-crashes-in-Ema.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH] UNTESTED: gnu: gtk+: Add upstream fix for crashes in Emacs and IceCat >From 5a11003732688c0fbbfdc831774f58ff6fe20a0b Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 29 Mar 2019 23:28:45 -0400 Subject: [PATCH] UNTESTED: gnu: gtk+: Add upstream fix for crashes in Emacs and IceCat. * gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gtk.scm (gtk+/fixed): New variable. (gtk+)[replacement]: New field. --- gnu/local.mk | 1 + gnu/packages/gtk.scm | 12 +++++++- .../gtk3-fix-deprecation-macro-use.patch | 29 +++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gtk3-fix-deprecation-macro-use.pat= ch diff --git a/gnu/local.mk b/gnu/local.mk index 18531d9a76..5639bc58d1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -887,6 +887,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \ %D%/packages/patches/gtk2-theme-paths.patch \ + %D%/packages/patches/gtk3-fix-deprecation-macro-use.patch \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \ %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index aab392758f..1d26aab963 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2013 Andreas Enge ;;; Copyright =C2=A9 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Court=C3= =A8s -;;; Copyright =C2=A9 2014, 2015, 2017, 2018 Mark H Weaver +;;; Copyright =C2=A9 2014, 2015, 2017, 2018, 2019 Mark H Weaver ;;; Copyright =C2=A9 2014 Eric Bavier ;;; Copyright =C2=A9 2015 Federico Beffa ;;; Copyright =C2=A9 2015 Paul van der Walt @@ -694,6 +694,7 @@ application suites.") ;; NOTE: When updating the version of 'gtk+', the hash of 'mate-themes'= in ;; mate.scm will also need to be updated. (version "3.24.2") + (replacement gtk+/fixed) (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -787,6 +788,15 @@ application suites.") (variable "GUIX_GTK3_PATH") (files '("lib/gtk-3.0"))))))) =20 +(define gtk+/fixed + (package + (inherit gtk+) + (source (origin + (inherit (package-source gtk+)) + (patches + (cons (search-patch "gtk3-fix-deprecation-macro-use.patch") + (origin-patches (package-source gtk+)))))))) + ;;; ;;; Guile bindings. ;;; diff --git a/gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch b/gn= u/packages/patches/gtk3-fix-deprecation-macro-use.patch new file mode 100644 index 0000000000..39cd4bd59a --- /dev/null +++ b/gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch @@ -0,0 +1,29 @@ +Copied from . +Fixes upstream bug , +and hopefully also , +, and . + +diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c +index 97ada6d73919fba3dfe192dd66929e90bc7677bb..764e39495f7edb0c3efe41cca2= 5b8bee4778887d 100644 +--- a/gdk/x11/gdkwindow-x11.c ++++ b/gdk/x11/gdkwindow-x11.c +@@ -2985,6 +2985,7 @@ gdk_window_x11_set_background (GdkWindow *windo= w, + double r, g, b, a; + cairo_surface_t *surface; + cairo_matrix_t matrix; ++ cairo_pattern_t *parent_relative_pattern; +=20 + if (GDK_WINDOW_DESTROYED (window)) + return; +@@ -2997,8 +2998,10 @@ gdk_window_x11_set_background (GdkWindow *wind= ow, + } +=20 + G_GNUC_BEGIN_IGNORE_DEPRECATIONS +- if (pattern =3D=3D gdk_x11_get_parent_relative_pattern ()) ++ parent_relative_pattern =3D gdk_x11_get_parent_relative_pattern (); + G_GNUC_END_IGNORE_DEPRECATIONS ++ ++ if (pattern =3D=3D parent_relative_pattern) + { + GdkWindow *parent; +=20 --=20 2.21.0 --=-=-=--