From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: crashes during Feval from within WINDOW_WANTS_HEADER_LINE_P Date: Sun, 2 Mar 2008 09:58:52 +1300 Message-ID: <18377.50060.603291.573919@kahikatea.snap.net.nz> References: <76EEBC00-5E78-4BC8-8AE6-8D657F71E94E@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1204405153 27421 80.91.229.12 (1 Mar 2008 20:59:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Mar 2008 20:59:13 +0000 (UTC) Cc: emacs- devel To: David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 01 21:59:38 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JVYnx-0003hA-MB for ged-emacs-devel@m.gmane.org; Sat, 01 Mar 2008 21:59:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVYnR-0004nM-7U for ged-emacs-devel@m.gmane.org; Sat, 01 Mar 2008 15:59:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JVYnN-0004lk-Co for emacs-devel@gnu.org; Sat, 01 Mar 2008 15:59:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JVYnM-0004jE-2r for emacs-devel@gnu.org; Sat, 01 Mar 2008 15:59:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVYnL-0004iz-Or for emacs-devel@gnu.org; Sat, 01 Mar 2008 15:58:59 -0500 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JVYnK-00085d-UA for emacs-devel@gnu.org; Sat, 01 Mar 2008 15:58:59 -0500 Original-Received: from kahikatea.snap.net.nz (28.30.255.123.static.snap.net.nz [123.255.30.28]) by viper.snap.net.nz (Postfix) with ESMTP id 06B653DAA5C; Sun, 2 Mar 2008 09:58:54 +1300 (NZDT) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 48C9C8FC6D; Sun, 2 Mar 2008 09:58:53 +1300 (NZDT) In-Reply-To: <76EEBC00-5E78-4BC8-8AE6-8D657F71E94E@gmail.com> X-Mailer: VM 7.19 under Emacs 22.1.91.2 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91004 Archived-At: 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