GNU bug report logs - #15801
24.3.50; bar scrolling freezes gtk emacs

Previous Next

Package: emacs;

Reported by: Jarek Czekalski <jarekczek <at> poczta.onet.pl>

Date: Mon, 4 Nov 2013 18:42:02 UTC

Severity: important

Found in version 24.3.50

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Jarek Czekalski <jarekczek <at> poczta.onet.pl>
Cc: 15801 <at> debbugs.gnu.org
Subject: bug#15801: 24.3.50; bar scrolling freezes gtk emacs
Date: Sun, 1 Dec 2013 12:07:07 +0100
1 dec 2013 kl. 11:43 skrev Jarek Czekalski <jarekczek <at> poczta.onet.pl>:

> 
> W dniu 2013-12-01 10:10, Jan Djärv pisze:
>> That brings back the error that commit fixed.
> 
> Your commit also did some optimizations. If the commit really treated only the case of -nw switch, it would have no influence on scroll bars in gtk.
> 
> If you separate your joined commit (fixing and optimization) into 2 separate commits, I can check which part introduces the problem.

I no longer know what commit you are talking about.  This:

=== modified file 'src/xgselect.c'
@@ -44,9 +44,13 @@

-  if (! (window_system_available (NULL)
-     && g_main_context_pending (context = g_main_context_default ())))
-    return pselect (fds_lim, rfds, wfds, efds, timeout, sigmask);
+  /* Do not try to optimize with an initial check with 
g_main_context_pending
+     and a call to pselect if it returns false.  If Gdk has a timeout 
for 0.01
+     second, and Emacs has a timeout for 1 second, 
g_main_context_pending will
+     return false, but the timeout will be 1 second, thus missing the gdk
+     timeout with a lot.  */
+
+  context = g_main_context_default ();



has absolutely nothing to do with -nw.  The bug is clearly described in the comment.
There is no optimization involved, in fact a bad optimization is removed.

As for your first fix, I assume you mean this:

+       // Sometimes gtk_events_pending is true, but gdk_event_handler
+       // receives nothing and does not increase the count.
+       // If we ignore these pending events, then we lock up,
+       // for example with continuos movements of vertical scroll bar.
+       if (!count) count = 1;


This basically introduces a busy wait, which is no good at all.  Note that Emacs is still running with SIGIO off with this patch, so while it may fix the symptoms, it does not fix the problem.

	Jan D.






This bug report was last modified 11 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.