GNU bug report logs -
#29170
Emacs freezes when doing a gui-get-selection on OpenBSD
Previous Next
Reported by: daimrod <at> omecha.info (Grégoire Jadi)
Date: Mon, 6 Nov 2017 14:22:02 UTC
Severity: normal
Tags: confirmed
Merged with 45544
Found in versions 26.0.90, 27.1.90
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
For some time now (emacs-25.1), emacs freezes when I use `org-capture'.
The problem occurs when emacs tries to read the SECONDARY selection.
The following snippet can be used to freeze emacs for 2s everytime on my
computer :
(let ((value 'SECONDARY)
(x-selection-timeout 2000))
;;; from org-get-x-clipboard in lisp/org-compat.el
(gui-get-selection value 'UTF8_STRING)
(gui-get-selection value 'COMPOUND_TEXT)
(gui-get-selection value 'STRING)
(gui-get-selection value 'TEXT))
If the user (me) send any commands (C-p, C-n, M-x, ...) to emacs when it
is frozen, Emacs will stay frozen even after the 2s timeout.
Most of the time, it is possible to recover from the freeze by sending
SIGUSR2 to the emacs process.
The backtrace is :
Debugger entered--Lisp error: (quit)
x-get-selection-internal(SECONDARY STRING nil nil)
#f(compiled-function (selection-symbol target-type &optional time-stamp terminal) #<bytecode 0x564065>)(SECONDARY STRING)
apply(#f(compiled-function (selection-symbol target-type &optional time-stamp terminal) #<bytecode 0x564065>) (SECONDARY STRING))
gui-backend-get-selection(SECONDARY STRING)
gui-get-selection(SECONDARY STRING)
(let ((value 'SECONDARY) (x-selection-timeout 2000)) (gui-get-selection value 'UTF8_STRING) (gui-get-selection value 'COMPOUND_TEXT) (gui-get-selection value 'STRING) (gui-get-selection value 'TEXT))
eval((let ((value 'SECONDARY) (x-selection-timeout 2000)) (gui-get-selection value 'UTF8_STRING) (gui-get-selection value 'COMPOUND_TEXT) (gui-get-selection value 'STRING) (gui-get-selection value 'TEXT)) nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
I've done some experiments :
- Any *single* call of `gui-get-selection' will not freeze emacs for 2s.
- Any *combination of two* calls of `gui-get-selection' will freeze
emacs for 2s but it will just stops if any command is sent (C-p, C-n,
...).
- Any *combination of three or four* calls of `gui-get-selection' will
freeze emacs for 2s and freeze emacs completely if any command is sent
(C-p, C-n, ...).
But I've no idea where to look to find out how to fix this problem.
Please, tell me how I can help.
I'm using Emacs 26.0.90 with Gtk3 on OpenBSD 6.2-current (GENERIC.MP).
Best,
In GNU Emacs 26.0.90 (build 1, x86_64-unknown-openbsd, GTK+ Version 3.22.24)
of 2017-10-29 built on puffy
Repository revision: 6361151a84d643d4a5d658f740dac5809c682704
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
Configured using:
'configure --build=amd64-unknown-openbsd --without-sound
--with-x-toolkit=gtk3 --prefix=/usr/local --sysconfdir=/etc
--mandir=/usr/local/man --infodir=/usr/local/info --localstatedir=/var
--disable-silent-rules --disable-gtk-doc 'CFLAGS=-O2 -pipe -fno-pie'
CPPFLAGS=-I/usr/local/include 'LDFLAGS=-L/usr/local/lib -nopie''
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK DBUS GSETTINGS NOTIFY GNUTLS
LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 LCMS2
Important settings:
value of $LC_ALL: en_US.UTF-8
value of $LC_COLLATE: en_US.UTF-8
value of $LC_CTYPE: en_US.UTF-8
value of $LC_MESSAGES: en_US.UTF-8
value of $LC_MONETARY: en_US.UTF-8
value of $LC_NUMERIC: en_US.UTF-8
value of $LC_TIME: en_US.UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
This bug report was last modified 3 years and 338 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.