1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00

Fix crash when using menus and tramp on NS

; Fixes bug#24472, bug#37557 and bug#37922.

* src/nsterm.m (ns_select): Don't drain outerpool in this function.

(cherry picked from commit f14869cd70)
This commit is contained in:
Alan Third 2021-01-02 22:27:53 +00:00
parent 3ec93bb7c2
commit e2d199aa44

View File

@ -4633,8 +4633,22 @@ in certain situations (rapid incoming events).
thread_select(pselect, 0, NULL, NULL, NULL, &t, sigmask);
}
[outerpool release];
outerpool = [[NSAutoreleasePool alloc] init];
/* FIXME: This draining of outerpool causes a crash when a buffer
running over tramp is displayed and the user tries to use the
menus. I believe some other autorelease pool's lifetime
straddles this call causing a violation of autorelease pool
nesting. There's no good reason to keep these here since the
pool will be drained some other time anyway, but removing them
leaves the menus sometimes not opening until the user moves their
mouse pointer, but that's better than a crash.
There must be something about running external processes like
tramp that interferes with the modal menu code.
See bugs 24472, 37557, 37922. */
// [outerpool release];
// outerpool = [[NSAutoreleasePool alloc] init];
send_appdefined = YES;