[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: alarm_signal_handler is called too frequently
From: |
Jan D. |
Subject: |
Re: alarm_signal_handler is called too frequently |
Date: |
Mon, 25 Oct 2004 16:38:10 +0200 |
I looked at this just now (please forgive the delay) and found that
things seem to be rather messed up.
1. The code makes provision to handle unexpected kinds of
keyboard/mouse input while the popup menu is popped up, and to handle
timers. That is a nice feature.
2. However, popup_get_selection is called inside BLOCK_INPUT, and it
calls timer_check, which can call Lisp code. This seems to be a bug.
I don't see any way we could make this safe. I think we have to
take out timer processing here. However, I have some doubt that
it really works--see below.
3. popup_get_selection is called whenever USE_GTK is not defined, but
popup_get_selection is only defined when USE_X_TOOLKIT. I suspect
this means that Emacs won't build in the non-toolkit mode any more.
Could someone check?
It does (FWIW when I update from cvs I run a script that builds the GTK,
lesstif, motif, lucid, non-toolkit and non-X versions of Emacs to catch
errors like this). That bit is inside a (rather long) section of
ifdefs,
the structure is like this:
#if defined (USE_GTK) || defined (USE_X_TOOLKIT)
/* popup_get_selection defined and used here. */
#else /* not USE_X_TOOLKIT && not USE_GTK */
/* Non toolkit code */
#endif
so popup_get_selection is not used for the non-toolkit build at all.
Jan D.
I propose the following change as a way to discover problems like #2
sooner. Could people try it and say if it crashes? (Strangely, it
does not crash for me when I try C-Mouse-3 just after enabling Font
Lock mode on emacs.c. I wonder why.)
It craches, but directly at start before any interaction. Disabling the
toolbar (./emacs -q -xrm '*toolBar: 0') makes it start OK, but it does
not
crash on any popup menu. This is on GNU/Linux, toolkit, GTK and
non-toolkit
versions.
Jan D.
*** eval.c 30 Jul 2004 23:43:15 -0400 1.221
--- eval.c 25 Oct 2004 05:34:28 -0400
***************
*** 1975,1981 ****
struct backtrace backtrace;
struct gcpro gcpro1, gcpro2, gcpro3;
! if (handling_signal)
abort ();
if (SYMBOLP (form))
--- 1985,1991 ----
struct backtrace backtrace;
struct gcpro gcpro1, gcpro2, gcpro3;
! if (handling_signal || INPUT_BLOCKED_P)
abort ();
if (SYMBOLP (form))
_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel
- alarm_signal_handler is called too frequently, YAMAMOTO Mitsuharu, 2004/10/12
- Re: alarm_signal_handler is called too frequently, Richard Stallman, 2004/10/13
- Re: alarm_signal_handler is called too frequently, YAMAMOTO Mitsuharu, 2004/10/14
- Re: alarm_signal_handler is called too frequently, YAMAMOTO Mitsuharu, 2004/10/17
- Re: alarm_signal_handler is called too frequently, Richard Stallman, 2004/10/25
- Re: alarm_signal_handler is called too frequently,
Jan D. <=
- Re: alarm_signal_handler is called too frequently, Richard Stallman, 2004/10/27
- Re: alarm_signal_handler is called too frequently, Jan D., 2004/10/28
- Re: alarm_signal_handler is called too frequently, YAMAMOTO Mitsuharu, 2004/10/28
- Re: alarm_signal_handler is called too frequently, Jan D., 2004/10/29
- Re: alarm_signal_handler is called too frequently, YAMAMOTO Mitsuharu, 2004/10/29
- Re: alarm_signal_handler is called too frequently, Richard Stallman, 2004/10/31
- Re: alarm_signal_handler is called too frequently, Jan D., 2004/10/31