From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#25875: 26.0.50; Hang logging out of MS-Windows Date: Mon, 27 Feb 2017 19:04:23 +0000 Message-ID: References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1488222948 15221 195.159.176.226 (27 Feb 2017 19:15:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2017 19:15:48 +0000 (UTC) Cc: 25875@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 27 20:15:44 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 1ciQlq-0003OL-5g for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Feb 2017 20:15:42 +0100 Original-Received: from localhost ([::1]:55972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciQlw-0002b9-3o for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Feb 2017 14:15:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciQba-0001zd-5D for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2017 14:05:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciQbW-0005qj-5s for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2017 14:05:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60460) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ciQbW-0005qf-2p for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2017 14:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ciQbV-0005no-RZ for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2017 14:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Feb 2017 19:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25875 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25875-submit@debbugs.gnu.org id=B25875.148822230122294 (code B ref 25875); Mon, 27 Feb 2017 19:05:01 +0000 Original-Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 19:05:01 +0000 Original-Received: from localhost ([127.0.0.1]:58659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciQbU-0005nW-RB for submit@debbugs.gnu.org; Mon, 27 Feb 2017 14:05:01 -0500 Original-Received: from mail-ua0-f182.google.com ([209.85.217.182]:34831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciQbT-0005nJ-8S for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 14:04:59 -0500 Original-Received: by mail-ua0-f182.google.com with SMTP id 40so67303885uau.2 for <25875@debbugs.gnu.org>; Mon, 27 Feb 2017 11:04:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=OvVxgGspKqT5vIsJdAM7UKH/NJGLxjGW+JWN9Ih5uz4=; b=QkRtMJQyEkZpM9qQ4Z5FutBY90Jf3eFDlU3l8hiFGB0rf1V5/nqIyUJT7VhYrnlXuf wR+HFULVCxnyu+vKxL8YZLLjbF65oEF8WzHRsAZoE2ovF0wwYWBb8RJ1/bxon/ivyXA4 7hy7HJ2axTJbl8doS4sHZ9aTCW/5/S0Fcz9ILj2+L/Y50H7CxJyEtHhDfkqzSFjzNR1N Y5atk8n/UcnaaOIaSBFg8clcFeZiiETVD9PCxutmpc3iz17XSxJG6Y3zf/8g0fWyDPo3 ZHfn3DPoV6N9TfctIBLzfZDSdxc+ne4PuBGoXda/z1JQ+V7rj39I15nLbSO6lzYZGbnP P/0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=OvVxgGspKqT5vIsJdAM7UKH/NJGLxjGW+JWN9Ih5uz4=; b=iECPMMlmKRSou5KMRCJ6XFMhc/z1v+kFyVOW+sAntE+AWut7tL5K+fBAFpdhu2xmgq GDPEKyoJUTuY7buOrCHb3Szd/V7E+oHsfEJVhfbboDADAKFHfh1xRYkCnOzT6dxasDsC RqG/8CGRoPQMrNmuf0Ie3GgpQpgiYhB8C/hzewRfBm8F394DIU1kMy4Q3TQgYAA2sriq tvrx+siiFa0yRR/67qNQzkRY3f1O+7n3n2GBnOHF8bFpRicaN4QTwkdeoqH5xa9CQxA+ lh8ov5B3ialQUQ4ezfPfCbBYz2Ln4nAlbrq7eDGc4dMGdYsTeHrotGmOkhRljKQG7MFu B9vw== X-Gm-Message-State: AMke39k083RmRFZqq5A0Kc6MDXpr/EUi8OQQsDu8794bdqWMgkliOf5BsynlgPpQSu1JYNMOw6c24O00NrJfBA== X-Received: by 10.31.59.197 with SMTP id i188mr6035129vka.45.1488222293647; Mon, 27 Feb 2017 11:04:53 -0800 (PST) Original-Received: by 10.176.71.214 with HTTP; Mon, 27 Feb 2017 11:04:23 -0800 (PST) In-Reply-To: <83shmzprwo.fsf@gnu.org> 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:129896 Archived-At: On 27 February 2017 at 15:36, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Mon, 27 Feb 2017 08:14:22 +0000 >> Cc: Eli Zaretskii , 25875@debbugs.gnu.org >> >> > Here's a quick and dirty attempt. If I haven't made a mistake, it replaces >> > every relevant call to SendMessage by a call to SendMessageTimeout with a >> > 100ms timeout. >> > >> > --- a/src/w32term.c >> > +++ b/src/w32term.c >> > @@ -537,6 +537,15 @@ x_update_begin (struct frame *f) >> > } >> > >> > >> > +#undef SendMessage >> > +#define SendMessage DebugSendMessage >> > + >> > +static LRESULT WINAPI >> > +DebugSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) >> > +{ >> > + return SendMessageTimeoutA (hWnd, Msg, wParam, lParam, 0, 100, NULL); >> > +} >> > + >> > /* Start update of window W. */ >> > >> > static void >> > >> > Ken >> >> Sorry Ken, I can't sabotage myself like that, I have work to do. > > This could be a misunderstanding: the above change is not supposed to > sabotage anything, it's supposed to be a 100% compatible change for > the current behavior when all threads are running, and also provide a > "fire escape" when the addressee of the message is for some reason > stuck, as we think happens in your scenario. >From the docs for SendMessageTimeout: "If the function succeeds, the return value is nonzero.". We're going to cast that to HWND and pretend it's a scrollbar? (See `my_create_vscrollbar()' in "w32term.c".) Then what happens? Ken, what happened when you tested this? > If you are unwilling to make such a sweeping change, could you at > least replace the call SendMessage in my_show_window with > SendMessageTimeoutA, using the above patch as a template? I will think about it, but I'll ignore the patch :)