GNU bug report logs - #25875
26.0.50; Hang logging out of MS-Windows

Previous Next

Package: emacs;

Reported by: Richard Copley <rcopley <at> gmail.com>

Date: Sat, 25 Feb 2017 19:37:01 UTC

Severity: normal

Found in version 26.0.50

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

Full log


Message #68 received at 25875 <at> debbugs.gnu.org (full text, mbox):

From: Richard Copley <rcopley <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25875 <at> debbugs.gnu.org, Ken Brown <kbrown <at> cornell.edu>
Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows
Date: Mon, 27 Feb 2017 19:04:23 +0000
On 27 February 2017 at 15:36, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Richard Copley <rcopley <at> gmail.com>
>> Date: Mon, 27 Feb 2017 08:14:22 +0000
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, 25875 <at> 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 :)




This bug report was last modified 8 years and 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.