[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs 24 randomly hanging
From: |
martin rudalics |
Subject: |
Re: emacs 24 randomly hanging |
Date: |
Tue, 21 Feb 2012 17:54:13 +0100 |
> It looks like there's an infinite loop in frame.c:next_frame.
Does the patch below help?
martin
=== modified file 'src/frame.c'
--- src/frame.c 2012-01-19 07:21:25 +0000
+++ src/frame.c 2012-02-21 16:46:43 +0000
@@ -924,7 +924,7 @@
static Lisp_Object
next_frame (Lisp_Object frame, Lisp_Object minibuf)
{
- Lisp_Object tail;
+ Lisp_Object tail, frames;
int passed = 0;
/* There must always be at least one frame in Vframe_list. */
@@ -935,58 +935,57 @@
forever. Forestall that. */
CHECK_LIVE_FRAME (frame);
+ frames = Fcopy_sequence (Vframe_list);
while (1)
- for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
+ for (tail = frames; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object f;
f = XCAR (tail);
-
- if (passed
- && ((!FRAME_TERMCAP_P (XFRAME (f)) && !FRAME_TERMCAP_P (XFRAME
(frame))
- && FRAME_KBOARD (XFRAME (f)) == FRAME_KBOARD (XFRAME (frame)))
- || (FRAME_TERMCAP_P (XFRAME (f)) && FRAME_TERMCAP_P (XFRAME
(frame))
- && FRAME_TTY (XFRAME (f)) == FRAME_TTY (XFRAME (frame)))))
+ if (passed)
{
- /* Decide whether this frame is eligible to be returned. */
-
/* If we've looped all the way around without finding any
eligible frames, return the original frame. */
if (EQ (f, frame))
return f;
-
- /* Let minibuf decide if this frame is acceptable. */
- if (NILP (minibuf))
- {
- if (! FRAME_MINIBUF_ONLY_P (XFRAME (f)))
- return f;
- }
- else if (EQ (minibuf, Qvisible))
- {
- FRAME_SAMPLE_VISIBILITY (XFRAME (f));
- if (FRAME_VISIBLE_P (XFRAME (f)))
- return f;
- }
- else if (INTEGERP (minibuf) && XINT (minibuf) == 0)
- {
- FRAME_SAMPLE_VISIBILITY (XFRAME (f));
- if (FRAME_VISIBLE_P (XFRAME (f))
- || FRAME_ICONIFIED_P (XFRAME (f)))
- return f;
- }
- else if (WINDOWP (minibuf))
- {
- if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)
- || EQ (WINDOW_FRAME (XWINDOW (minibuf)), f)
- || EQ (WINDOW_FRAME (XWINDOW (minibuf)),
- FRAME_FOCUS_FRAME (XFRAME (f))))
- return f;
- }
- else
- return f;
+ /* Decide whether this frame is eligible to be returned. */
+ else if ((!FRAME_TERMCAP_P (XFRAME (f)) && !FRAME_TERMCAP_P (XFRAME
(frame))
+ && FRAME_KBOARD (XFRAME (f)) == FRAME_KBOARD (XFRAME
(frame)))
+ || (FRAME_TERMCAP_P (XFRAME (f)) && FRAME_TERMCAP_P
(XFRAME (frame))
+ && FRAME_TTY (XFRAME (f)) == FRAME_TTY (XFRAME
(frame))))
+ {
+ /* Let minibuf decide if this frame is acceptable. */
+ if (NILP (minibuf))
+ {
+ if (! FRAME_MINIBUF_ONLY_P (XFRAME (f)))
+ return f;
+ }
+ else if (EQ (minibuf, Qvisible))
+ {
+ FRAME_SAMPLE_VISIBILITY (XFRAME (f));
+ if (FRAME_VISIBLE_P (XFRAME (f)))
+ return f;
+ }
+ else if (INTEGERP (minibuf) && XINT (minibuf) == 0)
+ {
+ FRAME_SAMPLE_VISIBILITY (XFRAME (f));
+ if (FRAME_VISIBLE_P (XFRAME (f))
+ || FRAME_ICONIFIED_P (XFRAME (f)))
+ return f;
+ }
+ else if (WINDOWP (minibuf))
+ {
+ if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)
+ || EQ (WINDOW_FRAME (XWINDOW (minibuf)), f)
+ || EQ (WINDOW_FRAME (XWINDOW (minibuf)),
+ FRAME_FOCUS_FRAME (XFRAME (f))))
+ return f;
+ }
+ else
+ return f;
+ }
}
-
- if (EQ (frame, f))
+ else if (EQ (frame, f))
passed++;
}
}
- emacs 24 randomly hanging, Adam, 2012/02/19
- Re: emacs 24 randomly hanging, Adam, 2012/02/19
- Re: emacs 24 randomly hanging, Andreas Schwab, 2012/02/19
- Re: emacs 24 randomly hanging, Dan Nicolaescu, 2012/02/20
- Re: emacs 24 randomly hanging, Adam, 2012/02/21
- Re: emacs 24 randomly hanging, Dan Nicolaescu, 2012/02/21
- Re: emacs 24 randomly hanging,
martin rudalics <=
- Re: emacs 24 randomly hanging, Adam, 2012/02/21
- Re: emacs 24 randomly hanging, martin rudalics, 2012/02/22
- Re: emacs 24 randomly hanging, Andreas Schwab, 2012/02/22
- Re: emacs 24 randomly hanging, martin rudalics, 2012/02/22
- Re: emacs 24 randomly hanging, Stefan Monnier, 2012/02/22
- Re: emacs 24 randomly hanging, martin rudalics, 2012/02/24
- Re: emacs 24 randomly hanging, Chong Yidong, 2012/02/22
- Re: emacs 24 randomly hanging, Eli Zaretskii, 2012/02/22
- Re: emacs 24 randomly hanging, Chong Yidong, 2012/02/23
- Re: emacs 24 randomly hanging, Christopher Schmidt, 2012/02/23