From: Nick Roberts <nickrob@snap.net.nz>
To: David Reitter <david.reitter@gmail.com>
Cc: emacs- devel <emacs-devel@gnu.org>
Subject: Re: crashes during Feval from within WINDOW_WANTS_HEADER_LINE_P
Date: Sun, 2 Mar 2008 09:58:52 +1300 [thread overview]
Message-ID: <18377.50060.603291.573919@kahikatea.snap.net.nz> (raw)
In-Reply-To: <76EEBC00-5E78-4BC8-8AE6-8D657F71E94E@gmail.com>
I'm not an expert, but
> I'm getting crashes after extending a macro. I would appreciate your
> help.
>
> I have added to the WINDOW_WANTS_HEADER_LINE_P macro (dispextern.h) a
> function call to an elisp function whose name is stored in `window-
> wants-header-line-function':
>
> && (NILP(Vwindow_wants_header_line_function)
> || \
> !NILP (safe_call_win(Vwindow_wants_header_line_function, (W)))))
>
>
>
> safe_call_win looks pretty straight-forward:
>
> /* Call function FN with window argument.
> Return the result, or nil if something went wrong. */
>
> Lisp_Object
> safe_call_win (fn, w)
> Lisp_Object fn;
> struct window *w;
> {
> Lisp_Object window;
> Lisp_Object val;
> struct gcpro gcpro1;
> val = Qnil;
> window = Qnil;
> if ((FUNCTIONP (fn)))
> {
> XSETWINDOW (window, w);
I don't think you need GCPRO1 here
> GCPRO1 (window);
> val = safe_call1 (fn, window);
> UNGCPRO;
> }
> return val;
> }
>
> However, I keep getting crashes, always during the evaluation of said
> function:
and it looks to me like the elisp function whose name is stored in
`window-wants-header-line-function' is a lisp primitive which either has
too many argumnts ( > 8 ) or whose argument list has been incorrectly
defined.
> 5 libSystem.B.dylib 0x966639af abort + 73
> 6 org.gnu.Emacs 0x000f320b Feval + 923 (eval.c:2362)
> 7 org.gnu.Emacs 0x000f360f Fprogn + 63 (eval.c:450)
> 8 org.gnu.Emacs 0x000f38df funcall_lambda + 671
> (eval.c:3185)
> 9 org.gnu.Emacs 0x000f3c2b Ffuncall + 443 (eval.c:
> 3062)
> 10 org.gnu.Emacs 0x000f1f3a
> internal_condition_case_2 + 266 (eval.c:1583)
> 11 org.gnu.Emacs 0x0001717e safe_call + 158 (xdisp.c:
> 2348)
> 12 org.gnu.Emacs 0x000171c5 safe_call1 + 37 (xdisp.c:
> 2362)
> 13 org.gnu.Emacs 0x00017278 safe_call_win + 168
> (xdisp.c:2382)
> 14 org.gnu.Emacs 0x0016cc4b draw_fringe_bitmap_1 +
> 1467 (fringe.c:669)
> 15 org.gnu.Emacs 0x0016cf2a draw_fringe_bitmap + 90
> (fringe.c:868)
>
> The elisp function that is called just evaluates to nil or t and
> doesn't do anything else. (It does work in some cases.)
> The crashes do not depend on the `window' argument, and they do not go
> away if I play around with the GCPRO call or an additional BLOCK_INPUT.
>
> What's going on?
but I might have it wrong.
--
Nick http://www.inet.net.nz/~nickrob
next prev parent reply other threads:[~2008-03-01 20:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-01 12:03 crashes during Feval from within WINDOW_WANTS_HEADER_LINE_P David Reitter
2008-03-01 20:58 ` Nick Roberts [this message]
2008-03-01 21:35 ` David Reitter
2008-03-02 7:53 ` Nick Roberts
2008-03-02 5:46 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18377.50060.603291.573919@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=david.reitter@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.