Bug#787419: libgtk-3-0: Freeze if window closed while resume-events pending

Ruben Undheim ruben.undheim at gmail.com
Mon Jun 1 14:08:19 UTC 2015


Package: libgtk-3-0
Version: 3.14.5-1
Severity: important
Tags: patch, jessie, sid, fixed-in-experimental

Dear Maintainer,

There is a bug in the jessie/sid version of gtk+3.0 which causes
problems with multiple programs. The most annoying of them (at least for me)
seems to be that gnome-terminal-server occasionally freezes and
makes it necessary to close down all open terminal windows.

It has been fixed upstream and also in the Debian experimental version,
but it is still present in jessie and sid. I think it is as
severe that it should be fixed also in jessie.


The upstream bug is here:
 https://bugzilla.gnome.org/show_bug.cgi?id=742636

with some discussion also here:
 https://bugzilla.gnome.org/show_bug.cgi?id=735101

A nice little Python script for testing the presence of the bug is also
attached to the latter bug:
 https://bugzilla.gnome.org/attachment.cgi?id=304326
 (Just hit the 'Make it stop working' button a lot, and when the
window closes, things are broken :) )


For sid, it will be fixed as soon as experimental is migrated, but for
jessie, a patch is needed.
I've applied the following patch to 3.14.5-1 on a system running Jessie and it
seems to fix the problem:



Index: gtk+3.0-3.14.5/gdk/gdkinternals.h
===================================================================
--- gtk+3.0-3.14.5.orig/gdk/gdkinternals.h
+++ gtk+3.0-3.14.5/gdk/gdkinternals.h
@@ -240,6 +240,7 @@ struct _GdkWindow
   guint in_update : 1;
   guint geometry_dirty : 1;
   guint event_compression : 1;
+  guint frame_clock_events_paused : 1;

   /* The GdkWindow that has the impl, ref:ed if another window.
    * This ref is required to keep the wrapper of the impl window alive
Index: gtk+3.0-3.14.5/gdk/gdkwindow.c
===================================================================
--- gtk+3.0-3.14.5.orig/gdk/gdkwindow.c
+++ gtk+3.0-3.14.5/gdk/gdkwindow.c
@@ -10603,6 +10603,8 @@ gdk_window_flush_events (GdkFrameClock *
   _gdk_display_pause_events (display);

   gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS);
+
+  window->frame_clock_events_paused = TRUE;
 }

 static void
@@ -10629,6 +10631,8 @@ gdk_window_resume_events (GdkFrameClock

   display = gdk_window_get_display (window);
   _gdk_display_unpause_events (display);
+
+  window->frame_clock_events_paused = FALSE;
 }

 static void
@@ -10661,6 +10665,9 @@ gdk_window_set_frame_clock (GdkWindow

   if (window->frame_clock)
     {
+     if (window->frame_clock_events_paused)
+       gdk_window_resume_events (window->frame_clock, G_OBJECT (window));
+
       g_signal_handlers_disconnect_by_func (G_OBJECT (window->frame_clock),
                                             G_CALLBACK
(gdk_window_flush_events),
                                             window);




Best regards,
Ruben


-- System Information:
Debian Release: 8.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'),
(500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armel

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libgtk-3-0 depends on:
ii  libatk-bridge2.0-0   2.14.0-2
ii  libatk1.0-0          2.14.0-1
ii  libc6                2.19-18
ii  libcairo-gobject2    1.14.0-2.1
ii  libcairo2            1.14.0-2.1
ii  libcolord2           1.2.1-1+b2
ii  libcups2             1.7.5-11
ii  libfontconfig1       2.11.0-6.3
ii  libfreetype6         2.5.2-3
ii  libgdk-pixbuf2.0-0   2.31.1-2+b1
ii  libglib2.0-0         2.42.1-1
ii  libgtk-3-common      3.14.5-1
ii  libjson-glib-1.0-0   1.0.2-1
ii  libpango-1.0-0       1.36.8-3
ii  libpangocairo-1.0-0  1.36.8-3
ii  libpangoft2-1.0-0    1.36.8-3
ii  librest-0.7-0        0.7.92-3
ii  libsoup2.4-1         2.48.0-1
ii  libwayland-client0   1.6.0-2
ii  libwayland-cursor0   1.6.0-2
ii  libx11-6             2:1.6.2-3
ii  libxcomposite1       1:0.4.4-1
ii  libxcursor1          1:1.1.14-1+b1
ii  libxdamage1          1:1.1.4-2+b1
ii  libxext6             2:1.3.3-1
ii  libxfixes3           1:5.0.1-2+b2
ii  libxi6               2:1.7.4-1+b2
ii  libxinerama1         2:1.1.3-1+b1
ii  libxkbcommon0        0.4.3-2
ii  libxml2              2.9.1+dfsg1-5
ii  libxrandr2           2:1.4.2-1+b1
ii  multiarch-support    2.19-18
ii  shared-mime-info     1.3-1

Versions of packages libgtk-3-0 recommends:
ii  hicolor-icon-theme  0.13-1
ii  libgtk-3-bin        3.14.5-1

Versions of packages libgtk-3-0 suggests:
ii  gvfs             1.22.2-1
ii  librsvg2-common  2.40.5-1

-- no debconf information



More information about the pkg-gnome-maintainers mailing list