Subject: bug#48406: 28.0.50; Emacs stuck in infinite loop in wait_reading_process_output when opening in fullscreen (NS)

From: Andrii Kolomoiets <[email-masked]>
Date: Fri, 14 May 2021 22:32:56 +0300

Illia Ostapyshyn <[email-masked]> writes:

> Executing like this doesn't work for me:
>
>     emacs -Q --execute "(push '(fullscreen . fullboth) default-frame-alist)"
>
> I've tried recompiling emacs with you configure flags, same
> result. Could it be the OS version? I doubt it, I recall having this
> issue long time ago, but I bore with it instead of reporting.

Well, I'm on macOS 11.3.1 now, recompiled Emacs with `make bootstrap`
still works fine.

> The patch didn't fix the issue, but there are two more instances of
> waitFullScreenTransition in nsterm.m. I narrowed it down to this one:
>
> @@ -8061,8 +8061,6 @@ - (void)toggleFullScreen: (id)sender
>          {
>  #endif
>            [[self window] toggleFullScreen:sender];
> -          // wait for fullscreen animation complete (bug#28496)
> -          [self waitFullScreenTransition];

This one is needed to avoid `(sleep-for 0.5)` in `frame.el`.

Maybe we need more users affected by this bug to find out the conditions for
reproducing this error.

Can you please enable NSTRACE by uncomenting this line in the
`src/nsterm.h` file:

/* #define NSTRACE_ENABLED 1          */

Hope trace messages will give us some more information on what is going
on.

-- 
Andrii