From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: daimrod@omecha.info (=?UTF-8?Q?Gr=C3=A9goire?= Jadi) Newsgroups: gmane.emacs.bugs Subject: bug#29170: 26.0.90; Emacs freezes when capturing an org-template Date: Mon, 06 Nov 2017 15:20:41 +0100 Message-ID: <87fu9rwksm.fsf@omecha.info> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1509978138 30859 195.159.176.226 (6 Nov 2017 14:22:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Nov 2017 14:22:18 +0000 (UTC) To: 29170@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 06 15:22:15 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBiI0-0007ha-Hq for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Nov 2017 15:22:12 +0100 Original-Received: from localhost ([::1]:48433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBiI7-0005So-MC for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Nov 2017 09:22:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBiHu-0005QU-Ju for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2017 09:22:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBiHq-0006Jk-F1 for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2017 09:22:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44488) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eBiHq-0006Jg-B5 for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2017 09:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eBiHq-0007tU-5c for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2017 09:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: daimrod@omecha.info (=?UTF-8?Q?Gr=C3=A9goire?= Jadi) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Nov 2017 14:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150997806930277 (code B ref -1); Mon, 06 Nov 2017 14:22:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Nov 2017 14:21:09 +0000 Original-Received: from localhost ([127.0.0.1]:53169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBiGy-0007sH-Q7 for submit@debbugs.gnu.org; Mon, 06 Nov 2017 09:21:09 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40625) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBiGw-0007rP-E4 for submit@debbugs.gnu.org; Mon, 06 Nov 2017 09:21:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBiGl-0005mh-34 for submit@debbugs.gnu.org; Mon, 06 Nov 2017 09:21:01 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33013) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eBiGl-0005mK-0C for submit@debbugs.gnu.org; Mon, 06 Nov 2017 09:20:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBiGg-0004vG-Kv for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2017 09:20:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBiGa-0005V3-Qa for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2017 09:20:50 -0500 Original-Received: from a.omecha.info ([89.234.176.136]:33752 helo=omecha.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBiGa-0005Th-Jn for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2017 09:20:44 -0500 Original-Received: from puffy.omecha.info (unknown [192.168.99.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by omecha.info (Postfix) with ESMTPSA id 6695A1EF for ; Mon, 6 Nov 2017 15:20:42 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:139501 Archived-At: 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) #)(SECONDARY STRING) apply(#f(compiled-function (selection-symbol target-type &optional time-stamp terminal) #) (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