From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: crash: divide by 0 Date: Tue, 4 Jan 2005 09:52:44 +0900 (JST) Message-ID: <200501040052.JAA09191@etlken.m17n.org> References: <41D972B1.8070004@freemail.hu> <41D97B49.2000702@freemail.hu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1104800151 16803 80.91.229.6 (4 Jan 2005 00:55:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Jan 2005 00:55:51 +0000 (UTC) Cc: sds@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 04 01:55:38 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Clcz3-0006GD-00 for ; Tue, 04 Jan 2005 01:55:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CldAE-0008Ks-Lt for ged-emacs-devel@m.gmane.org; Mon, 03 Jan 2005 20:07:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Cld9l-0008Ax-A9 for emacs-devel@gnu.org; Mon, 03 Jan 2005 20:06:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Cld9j-00089m-3Q for emacs-devel@gnu.org; Mon, 03 Jan 2005 20:06:39 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cld9i-00088f-U6 for emacs-devel@gnu.org; Mon, 03 Jan 2005 20:06:38 -0500 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1ClcwX-0006ln-B0; Mon, 03 Jan 2005 19:53:02 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id j040qjY7030150; Tue, 4 Jan 2005 09:52:46 +0900 Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6p2/8.11.6) with ESMTP id j040qjq08528; Tue, 4 Jan 2005 09:52:45 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id JAA09191; Tue, 4 Jan 2005 09:52:44 +0900 (JST) Original-To: "B. Anyos" In-reply-to: <41D97B49.2000702@freemail.hu> (banyos@freemail.hu) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3.50 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) 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: main.gmane.org gmane.emacs.devel:31777 In article <41D97B49.2000702@freemail.hu>, "B. Anyos" writes: > It seems that > FRAME_SPACE_WIDTH (it->f) > is zero (i.e. it->f->space_width is zero) > While debugging and changing this to anything but zero > the crash goes away. > This space_width - according to the Changelog - is a > relatively new code (added by Kenichi Handa on 2004-12-30) > Could it be the problem that it is not initialized ? I wrote: >> Similar change will be necessary for the other platforms. So, I think you are using Emacs on Mac or Windows. And, as I found these changelogs in today's emacs: 2005-01-03 Jason Rumney * w32bdf.c (w32_load_bdf_font): Set fontp->average_width and fontp->space_width to FONT_WIDTH so they are valid. * w32fns.c (w32_load_system_font): Set FONT_WIDTH to maximum, not average width. Set fontp->average_width and fontp->space_width to their appropriate values. * w32term.c (x_new_font): Set FRAME_COLUMN_WIDTH to fontp->average_width, not FONT_WIDTH. Set FRAME_SPACE_WIDTH to fontp->space_width. 2005-01-03 YAMAMOTO Mitsuharu * macterm.c (x_new_font): Set FRAME_SPACE_WIDTH. (x_font_min_bounds, XLoadQueryFont): Use the correct font width metrics for max and min bounds. (x_load_font): Correctly calculate average font width metrics. perhaps the problem is already fixed. --- Ken'ichi HANDA handa@m17n.org