unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15801: 24.3.50; bar scrolling freezes gtk emacs
@ 2013-11-04 18:42 Jarek Czekalski
  2013-11-05 12:57 ` bug#15801: 15801: commit identified Jarek Czekalski
                   ` (11 more replies)
  0 siblings, 12 replies; 32+ messages in thread
From: Jarek Czekalski @ 2013-11-04 18:42 UTC (permalink / raw)
  To: 15801

[-- Attachment #1: Type: text/plain, Size: 9704 bytes --]


I crash Emacs built with GTK on Debian Jessie (unstable),
by performing massive scrolling using mouse and the
vertical scroll bar. Messages buffer may be used to that
or the title screen. After several movements with left
button down the scroll bar stops reacting, Emacs as well.

As I was afraid it would be difficult to reproduce
I decided to debug it. What I found out is that
sometimes wait_reading_process_output does not return
for really long time and this causes the freeze.
On the other hand the loop (inside wait_reading_process_output)
works all the time.
XTread_socket from xterm.c also is working, but not properly.
See the comment from the patch (attached):

+       // 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;

I don't think it's the correct patch. Rather investigation is required,
why gdk_event_handler is not increasing the count.
But I don't feel enough confident with gtk, gdk and Emacs code.
A bit tired also. Anyway I offer further help with solving
this issue, because I can easily reproduce it.

My glib is 2.36.4, libgtk-3-0: 3.8.4-1.

Revisions on which I confirmed the freeze: r113450, r114178, r114884.

Somehow htmlfontify entered the patch file, but I didn't remove
it manually.


In GNU Emacs 24.3.50.5 (i686-pc-linux-gnu, GTK+ Version 3.8.4)
  of 2013-11-04 on jcdeb
Bzr revision: 114884 rgm@gnu.org-20131031213910-3509l9e973ne3zy1
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description:    Debian GNU/Linux testing (jessie)

Important settings:
   value of $LC_ALL: en_US
   value of $LANG: pl_PL
   locale-coding-system: iso-latin-1-unix
   default enable-multibyte-characters: t

Major mode: Outline

Minor modes in effect:
   global-whitespace-mode: t
   global-hl-line-mode: t
   recentf-mode: t
   tooltip-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   size-indication-mode: t
   column-number-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
C-h C-h r <help-echo> <down-mouse-2> <mouse-1> C-s
p a t c h C-s C-s <help-echo> <help-echo> <help-echo>
<tool-bar> <Back in history> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <tool-bar> <Back
in history> <help-echo> <help-echo> C-s p a t c h <help-echo>
<down-mouse-2> <mouse-1> <next> <C-down> <C-down> <C-down>
<C-down> <C-down> <C-down> <C-down> <C-down> <C-down>
<next> <next> <prior> <prior> <prior> <prior> <next>
<next> <next> <prior> <prior> C-x C-f <up> <backspace>
<backspace> <backspace> <backspace> C-g C-x C-f <up>
C-x C-f <up> <C-backspace> <C-backspace> <C-backspace>
e r t c / <backspace> <backspace> <backspace> <backspace>
t c / <tab> <tab> <f6> <f6> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <up>
<up> <next> <down> <up> <prior> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <tab> <right> <right> <return>
M-s o d i f f <return> <help-echo> <down-mouse-2> <mouse-1>
<help-echo> <up> <up> C-SPC <end> M-w <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> M-x r e p o <tab> r <tab> <return>

Recent messages:
Loading grep...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark saved where search started [2 times]
Quit
completing-read-default: Command attempted to use minibuffer while in 
minibuffer
Making completion list...
indent-relative: Buffer is read-only: #<buffer *Completions*>
Searched 1 buffer; 4 matches for `diff'
Mark set
Making completion list...

Load-path shadows:
/usr/share/emacs/site-lisp/auto-autoloads hides 
/usr/local/share/emacs/site-lisp/auto-autoloads
/usr/share/emacs/site-lisp/ssl hides /usr/local/share/emacs/site-lisp/ssl
/usr/share/emacs/site-lisp/images hides 
/usr/local/share/emacs/site-lisp/images
/usr/share/emacs/site-lisp/font hides /usr/local/share/emacs/site-lisp/font
/usr/share/emacs/site-lisp/devices hides 
/usr/local/share/emacs/site-lisp/devices
/usr/share/emacs/site-lisp/url-hotlist hides 
/usr/local/share/emacs/site-lisp/url-hotlist
/usr/share/emacs/site-lisp/css hides /usr/local/share/emacs/site-lisp/css
/usr/share/emacs/site-lisp/docomp hides 
/usr/local/share/emacs/site-lisp/docomp
/usr/share/emacs/site-lisp/custom-load hides 
/usr/local/share/emacs/site-lisp/custom-load
/usr/share/emacs/site-lisp/w3 hides /usr/local/share/emacs/site-lisp/w3
/usr/share/emacs/site-lisp/w3-xemac hides 
/usr/local/share/emacs/site-lisp/w3-xemac
/usr/share/emacs/site-lisp/w3-widget hides 
/usr/local/share/emacs/site-lisp/w3-widget
/usr/share/emacs/site-lisp/w3-vars hides 
/usr/local/share/emacs/site-lisp/w3-vars
/usr/share/emacs/site-lisp/w3-toolbar hides 
/usr/local/share/emacs/site-lisp/w3-toolbar
/usr/share/emacs/site-lisp/w3-style hides 
/usr/local/share/emacs/site-lisp/w3-style
/usr/share/emacs/site-lisp/w3-speak hides 
/usr/local/share/emacs/site-lisp/w3-speak
/usr/share/emacs/site-lisp/w3-speak-table hides 
/usr/local/share/emacs/site-lisp/w3-speak-table
/usr/share/emacs/site-lisp/w3-props hides 
/usr/local/share/emacs/site-lisp/w3-props
/usr/share/emacs/site-lisp/w3-print hides 
/usr/local/share/emacs/site-lisp/w3-print
/usr/share/emacs/site-lisp/w3-parse hides 
/usr/local/share/emacs/site-lisp/w3-parse
/usr/share/emacs/site-lisp/w3-mouse hides 
/usr/local/share/emacs/site-lisp/w3-mouse
/usr/share/emacs/site-lisp/w3-menu hides 
/usr/local/share/emacs/site-lisp/w3-menu
/usr/share/emacs/site-lisp/w3-keymap hides 
/usr/local/share/emacs/site-lisp/w3-keymap
/usr/share/emacs/site-lisp/w3-java hides 
/usr/local/share/emacs/site-lisp/w3-java
/usr/share/emacs/site-lisp/w3-imap hides 
/usr/local/share/emacs/site-lisp/w3-imap
/usr/share/emacs/site-lisp/w3-hotindex hides 
/usr/local/share/emacs/site-lisp/w3-hotindex
/usr/share/emacs/site-lisp/w3-hot hides 
/usr/local/share/emacs/site-lisp/w3-hot
/usr/share/emacs/site-lisp/w3-forms hides 
/usr/local/share/emacs/site-lisp/w3-forms
/usr/share/emacs/site-lisp/w3-fast-parse hides 
/usr/local/share/emacs/site-lisp/w3-fast-parse
/usr/share/emacs/site-lisp/w3-emulate hides 
/usr/local/share/emacs/site-lisp/w3-emulate
/usr/share/emacs/site-lisp/w3-emacs hides 
/usr/local/share/emacs/site-lisp/w3-emacs
/usr/share/emacs/site-lisp/w3-display hides 
/usr/local/share/emacs/site-lisp/w3-display
/usr/share/emacs/site-lisp/w3-dired hides 
/usr/local/share/emacs/site-lisp/w3-dired
/usr/share/emacs/site-lisp/w3-cus hides 
/usr/local/share/emacs/site-lisp/w3-cus
/usr/share/emacs/site-lisp/w3-compat hides 
/usr/local/share/emacs/site-lisp/w3-compat
/usr/share/emacs/site-lisp/w3-cfg hides 
/usr/local/share/emacs/site-lisp/w3-cfg
/usr/share/emacs/site-lisp/w3-auto hides 
/usr/local/share/emacs/site-lisp/w3-auto
/usr/share/emacs/site-lisp/cmake-mode hides 
/usr/local/share/emacs/site-lisp/cmake-data/cmake-mode
/usr/local/share/emacs/site-lisp/flim/md4 hides 
/usr/local/share/emacs/24.3.50/lisp/md4
/usr/local/share/emacs/site-lisp/flim/hex-util hides 
/usr/local/share/emacs/24.3.50/lisp/hex-util
/usr/local/share/emacs/site-lisp/dictionaries-common/ispell hides 
/usr/local/share/emacs/24.3.50/lisp/textmodes/ispell
/usr/local/share/emacs/site-lisp/dictionaries-common/flyspell hides 
/usr/local/share/emacs/24.3.50/lisp/textmodes/flyspell
/usr/local/share/emacs/site-lisp/flim/sasl-digest hides 
/usr/local/share/emacs/24.3.50/lisp/net/sasl-digest
/usr/local/share/emacs/site-lisp/flim/sasl-ntlm hides 
/usr/local/share/emacs/24.3.50/lisp/net/sasl-ntlm
/usr/local/share/emacs/site-lisp/flim/sasl hides 
/usr/local/share/emacs/24.3.50/lisp/net/sasl
/usr/local/share/emacs/site-lisp/flim/sasl-cram hides 
/usr/local/share/emacs/24.3.50/lisp/net/sasl-cram
/usr/local/share/emacs/site-lisp/flim/ntlm hides 
/usr/local/share/emacs/24.3.50/lisp/net/ntlm
/usr/local/share/emacs/site-lisp/flim/hmac-md5 hides 
/usr/local/share/emacs/24.3.50/lisp/net/hmac-md5
/usr/local/share/emacs/site-lisp/flim/hmac-def hides 
/usr/local/share/emacs/24.3.50/lisp/net/hmac-def

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils vc-bzr noutline outline misearch multi-isearch
jka-compr info disp-table grep compile comint ansi-color ring whitespace
hl-line cus-start cus-load yasnippet derived easy-mmode edmacro kmacro
help-mode folding-isearch folding cl-macs gv advice help-fns bookmark pp
recentf tree-widget wid-edit easymenu cl cl-loaddefs cl-lib server
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)


[-- Attachment #2: fix_scroll_hang_1_0.txt --]
[-- Type: text/plain, Size: 1649 bytes --]

=== modified file 'lisp/htmlfontify.el'
*** lisp/htmlfontify.el	2013-10-30 19:35:14 +0000
--- lisp/htmlfontify.el	2013-11-04 06:58:29 +0000
*************** You may also want to set `hfy-page-heade
*** 2410,2418 ****
      (load file 'NOERROR nil nil) ))
  
  \f
! ;;;### (autoloads nil "hfy-cmap" "hfy-cmap.el" "df4e418d0d8749ead9d32bb2c7a5bd56")
  ;;; Generated autoloads from hfy-cmap.el
  (push (purecopy '(htmlfontify 0 20)) package--builtin-versions)
  (autoload 'htmlfontify-load-rgb-file "hfy-cmap" "\
  Load an X11 style rgb.txt FILE.
  Search `hfy-rgb-load-path' if FILE is not specified.
--- 2410,2419 ----
      (load file 'NOERROR nil nil) ))
  
  \f
! ;;;### (autoloads nil "hfy-cmap" "hfy-cmap.el" "9fc09983e774dd0938661615b457fb59")
  ;;; Generated autoloads from hfy-cmap.el
  (push (purecopy '(htmlfontify 0 20)) package--builtin-versions)
+ 
  (autoload 'htmlfontify-load-rgb-file "hfy-cmap" "\
  Load an X11 style rgb.txt FILE.
  Search `hfy-rgb-load-path' if FILE is not specified.

=== modified file 'src/xterm.c'
*** src/xterm.c	2013-10-29 16:08:08 +0000
--- src/xterm.c	2013-11-04 18:20:27 +0000
*************** XTread_socket (struct terminal *terminal
*** 7060,7065 ****
--- 7060,7071 ----
        current_count = -1;
        current_hold_quit = 0;
  
+       // 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;
+ 
        if (current_finish == X_EVENT_GOTO_OUT)
          break;
      }


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2014-04-21 15:56 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-04 18:42 bug#15801: 24.3.50; bar scrolling freezes gtk emacs Jarek Czekalski
2013-11-05 12:57 ` bug#15801: 15801: commit identified Jarek Czekalski
2013-11-06 19:48 ` bug#15801: it's a different revision, 112892 Jarek Czekalski
2013-11-21  6:00   ` Jan Djärv
2013-11-21  7:25     ` bug#15801: 24.3.50; bar scrolling freezes gtk emacs Jarek Czekalski
2013-11-30 11:41       ` Jan Djärv
2013-11-30 11:54         ` Eli Zaretskii
2013-11-30 12:51           ` Jan Djärv
2013-11-30 13:55             ` Eli Zaretskii
2013-11-30 14:05               ` Jan Djärv
2013-11-30 18:11               ` Jarek Czekalski
2013-11-30 18:38                 ` Eli Zaretskii
2013-11-30 17:04 ` Jarek Czekalski
2013-11-30 23:16   ` Jan Djärv
     [not found]     ` <529AF507.5080509@poczta.onet.pl>
     [not found]       ` <0440E2A5-37C6-4F29-9B5D-38A6AE88C3B5@swipnet.se>
     [not found]         ` <529B12DB.6020407@poczta.onet.pl>
2013-12-01 11:07           ` Jan Djärv
2013-12-01 11:38             ` Jarek Czekalski
2013-12-01 11:48               ` Jan Djärv
2013-11-30 17:10 ` bug#15801: 24.3.50; bar scrolling freezes gtk emacs - stdout warning Jarek Czekalski
2013-12-02  8:04 ` bug#15801: 24.3.50; bar scrolling freezes gtk emacs Jarek Czekalski
2013-12-02  8:18 ` Jarek Czekalski
2013-12-02 17:11 ` Jarek Czekalski
2013-12-03 22:27 ` Jarek Czekalski
2013-12-04 20:28 ` Jarek Czekalski
2013-12-05 17:08   ` Jarek Czekalski
2013-12-07 14:34     ` Jan Djärv
2013-12-08 16:14 ` Jarek Czekalski
2013-12-08 23:29 ` Jarek Czekalski
2013-12-11 19:52   ` Jan Djärv
2013-12-20  6:32   ` Jarek Czekalski
2013-12-20  8:58     ` Eli Zaretskii
2014-04-21 10:34 ` Jarek Czekalski
2014-04-21 15:56   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).