unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Joseph Mingrone <jrm@ftfl.ca>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, Eli Zaretskii <eliz@gnu.org>,
	22214@debbugs.gnu.org, Brian Burns <bburns.km@gmail.com>
Subject: bug#22214: 25.0.50; lock up with gui dialogs and clipmon-mode
Date: Mon, 25 Apr 2022 08:50:59 +0800	[thread overview]
Message-ID: <87tuai6l58.fsf@yahoo.com> (raw)
In-Reply-To: <86v8uyd38g.fsf@phe.ftfl.ca> (Joseph Mingrone's message of "Sun,  24 Apr 2022 10:23:43 -0300")

Joseph Mingrone <jrm@ftfl.ca> writes:

> I stopped using clipmon shortly after this bug was reported, but I just
> cloned the repository and ran
>
> % emacs -Q
> (load "/path/to/clipmon/clipmon.el")
> (run-at-time nil 2 (lambda () (gui-get-primary-selection)))
> (menu-set-font)
>
> When I dismissed the dialog box, sometimes things were fine, but other
> times, Emacs started to use 100% CPU and would not respond to input.
> Now I am able to kill the run-away emacs process and regain control of
> the system.  Below is information about my current installation.

Does this fix the problem?

diff --git a/src/xselect.c b/src/xselect.c
index 6d167c0b6f..eb297e9cba 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1255,7 +1255,9 @@ x_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type,
   int nsecs = (timeout % 1000) * 1000000;
   TRACE1 ("  Start waiting %"PRIdMAX" secs for SelectionNotify", secs);
   wait_reading_process_output (secs, nsecs, 0, false,
-			       reading_selection_reply, NULL, 0);
+			       /* Don't run any timers, since this
+				  code isn't reentrant.  */
+			       reading_selection_reply, NULL, -1);
   TRACE1 ("  Got event = %d", !NILP (XCAR (reading_selection_reply)));
 
   if (NILP (XCAR (reading_selection_reply)))





  reply	other threads:[~2022-04-25  0:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-20  6:26 bug#22214: 25.0.50; lock up with gui dialogs and clipmon-mode Joseph Mingrone
2015-12-20 15:54 ` Eli Zaretskii
2015-12-21  2:31   ` Joseph Mingrone
2015-12-21 15:24     ` Eli Zaretskii
2015-12-21 16:41       ` Joseph Mingrone
2015-12-21 17:50         ` Eli Zaretskii
2015-12-21 19:42           ` Joseph Mingrone
2015-12-21  0:21 ` Brian Burns
2015-12-21  0:45   ` Joseph Mingrone
2015-12-22  7:56     ` Brian Burns
2015-12-21 15:26   ` Eli Zaretskii
2015-12-22  5:21 ` Joseph Mingrone
2015-12-22 16:06   ` Eli Zaretskii
2015-12-23 17:00     ` Joseph Mingrone
2015-12-23 17:12       ` Eli Zaretskii
2015-12-23 18:18         ` Joseph Mingrone
2015-12-23 18:22           ` Eli Zaretskii
2015-12-23 20:16             ` Brian Burns
2015-12-23 21:21               ` Joseph Mingrone
2015-12-24  7:43                 ` Brian Burns
2015-12-24 16:20                   ` Eli Zaretskii
2015-12-27  7:29                     ` Brian Burns
2022-04-23 14:06                 ` Lars Ingebrigtsen
2022-04-24 13:23                   ` Joseph Mingrone
2022-04-25  0:50                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-05-23  8:02                       ` Lars Ingebrigtsen
2022-05-23 19:02                         ` Joseph Mingrone
2022-05-24  0:27                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-29 15:51                             ` Joseph Mingrone
2022-05-29 23:58                               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-30  6:05                               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-30 13:00                                 ` Joseph Mingrone
2022-05-30 13:34                                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tuai6l58.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=22214@debbugs.gnu.org \
    --cc=bburns.km@gmail.com \
    --cc=eliz@gnu.org \
    --cc=jrm@ftfl.ca \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).