emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f14869c 2/2: Fix crash when using menus and tramp on NS


From: Alan Third
Subject: master f14869c 2/2: Fix crash when using menus and tramp on NS
Date: Sat, 2 Jan 2021 17:32:40 -0500 (EST)

branch: master
commit f14869cd70e61b1908ec88a5e3d4bf21c7d538a0
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>

    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.
---
 src/nsterm.m | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index a4ee147..2731063 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4721,8 +4721,22 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds,
       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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]