aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Third2021-01-02 22:27:53 +0000
committerAlan Third2021-01-02 22:29:55 +0000
commitf14869cd70e61b1908ec88a5e3d4bf21c7d538a0 (patch)
tree4bba3ccd0e9b0418b4f1b1f90bb5120bb15bd07c
parentd84cf78df8ea5d99cc5b38c49f3b7aed081170f5 (diff)
downloademacs-f14869cd70e61b1908ec88a5e3d4bf21c7d538a0.tar.gz
emacs-f14869cd70e61b1908ec88a5e3d4bf21c7d538a0.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.
-rw-r--r--src/nsterm.m18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index a4ee1476933..27310639508 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4721,8 +4721,22 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds,
4721 thread_select(pselect, 0, NULL, NULL, NULL, &t, sigmask); 4721 thread_select(pselect, 0, NULL, NULL, NULL, &t, sigmask);
4722 } 4722 }
4723 4723
4724 [outerpool release]; 4724 /* FIXME: This draining of outerpool causes a crash when a buffer
4725 outerpool = [[NSAutoreleasePool alloc] init]; 4725 running over tramp is displayed and the user tries to use the
4726 menus. I believe some other autorelease pool's lifetime
4727 straddles this call causing a violation of autorelease pool
4728 nesting. There's no good reason to keep these here since the
4729 pool will be drained some other time anyway, but removing them
4730 leaves the menus sometimes not opening until the user moves their
4731 mouse pointer, but that's better than a crash.
4732
4733 There must be something about running external processes like
4734 tramp that interferes with the modal menu code.
4735
4736 See bugs 24472, 37557, 37922. */
4737
4738 // [outerpool release];
4739 // outerpool = [[NSAutoreleasePool alloc] init];
4726 4740
4727 4741
4728 send_appdefined = YES; 4742 send_appdefined = YES;