aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Third2021-01-02 22:27:53 +0000
committerAlan Third2021-04-04 11:44:37 +0100
commite2d199aa44a92e50f480e0aa265f96a144d57a60 (patch)
tree3fa3970ea7ae65fbbbc8638d5ddb5d448a0ae387 /src
parent3ec93bb7c240edd6e06647a75df31acc6ce600dd (diff)
downloademacs-e2d199aa44a92e50f480e0aa265f96a144d57a60.tar.gz
emacs-e2d199aa44a92e50f480e0aa265f96a144d57a60.zip
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 f14869cd70e61b1908ec88a5e3d4bf21c7d538a0)
Diffstat (limited to 'src')
-rw-r--r--src/nsterm.m18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index b8658a05daf..26cc9486141 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4633,8 +4633,22 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds,
4633 thread_select(pselect, 0, NULL, NULL, NULL, &t, sigmask); 4633 thread_select(pselect, 0, NULL, NULL, NULL, &t, sigmask);
4634 } 4634 }
4635 4635
4636 [outerpool release]; 4636 /* FIXME: This draining of outerpool causes a crash when a buffer
4637 outerpool = [[NSAutoreleasePool alloc] init]; 4637 running over tramp is displayed and the user tries to use the
4638 menus. I believe some other autorelease pool's lifetime
4639 straddles this call causing a violation of autorelease pool
4640 nesting. There's no good reason to keep these here since the
4641 pool will be drained some other time anyway, but removing them
4642 leaves the menus sometimes not opening until the user moves their
4643 mouse pointer, but that's better than a crash.
4644
4645 There must be something about running external processes like
4646 tramp that interferes with the modal menu code.
4647
4648 See bugs 24472, 37557, 37922. */
4649
4650 // [outerpool release];
4651 // outerpool = [[NSAutoreleasePool alloc] init];
4638 4652
4639 4653
4640 send_appdefined = YES; 4654 send_appdefined = YES;