[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#71223: 30.0.50; stack overflow after very fast opening and closing o
|
From: |
Eli Zaretskii |
|
Subject: |
bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames |
|
Date: |
Mon, 27 May 2024 15:36:35 +0300 |
> Cc: 71223@debbugs.gnu.org
> Date: Mon, 27 May 2024 15:23:01 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> Does the patch below help?
Actually, the more thorough patch below should be better. Can you see
if it solves the problems with "Lisp nesting exceeds
`max-lisp-eval-depth'"?
Stefan, any comments about the problem and the proposed solution?
diff --git a/lisp/server.el b/lisp/server.el
index b650532..fcaf0ab 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1034,6 +1034,15 @@ server-goto-toplevel
(run-with-timer 0 nil (lambda () (server-execute-continuation proc)))
(top-level)))
+(defun server--sit-for (proc seconds)
+ "Like `sit-for', but disable filter of process PROC and don't redisplay."
+ (let ((orig-filter (process-filter proc)))
+ (unwind-protect
+ (progn
+ (set-process-filter proc nil)
+ (sit-for seconds t))
+ (set-process-filter proc orig-filter))))
+
;; We use various special properties on process objects:
;; - `env' stores the info about the environment of the emacsclient process.
;; - `continuation' is a no-arg function that we need to execute. It contains
@@ -1159,7 +1168,7 @@ server-process-filter
;; it, in case the error written by emacsclient to stderr is not
;; visible for some reason.
(message "Authentication failed")
- (sit-for 2)
+ (server--sit-for proc 2)
(server-send-string
proc (concat "-error " (server-quote-arg "Authentication failed")))
(unless (eq system-type 'windows-nt)
@@ -1169,7 +1178,7 @@ server-process-filter
(delete-terminal terminal))))
;; Before calling `delete-process', give emacsclient time to
;; receive the error string and shut down on its own.
- (sit-for 1)
+ (server--sit-for proc 1)
(delete-process proc)
;; We return immediately.
(cl-return-from server-process-filter)))
@@ -1508,7 +1517,7 @@ server-return-error
;; it, in case the error written by emacsclient to stderr is not
;; visible for some reason.
(message (error-message-string err))
- (sit-for 2)
+ (server--sit-for proc 2)
(server-send-string
proc (concat "-error " (server-quote-arg
(error-message-string err))))
@@ -1520,7 +1529,7 @@ server-return-error
(delete-terminal terminal))))
;; Before calling `delete-process', give emacsclient time to
;; receive the error string and shut down on its own.
- (sit-for 5)
+ (server--sit-for proc 5)
(delete-process proc)))
(defun server-goto-line-column (line-col)
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames, Daniel Clemente, 2024/05/27
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames, Eli Zaretskii, 2024/05/27
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames,
Eli Zaretskii <=
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames, Stefan Monnier, 2024/05/27
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames, Eli Zaretskii, 2024/05/27
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames, Stefan Monnier, 2024/05/27
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames, Eli Zaretskii, 2024/05/27
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames, Eli Zaretskii, 2024/05/27
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames, Stefan Monnier, 2024/05/28
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames, Eli Zaretskii, 2024/05/29
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames, Stefan Monnier, 2024/05/29
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames, Eli Zaretskii, 2024/05/30
- bug#71223: 30.0.50; stack overflow after very fast opening and closing of frames, Stefan Monnier, 2024/05/30