From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Peter Tury" Newsgroups: gmane.emacs.bugs Subject: bug#688: Arithmetic error at 'About Emacs' when --with-xft=no Date: Mon, 11 Aug 2008 23:05:15 +0200 Message-ID: References: <87r68vfkjp.fsf@stupidchicken.com> Reply-To: Peter Tury , 688@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1218490068 15209 80.91.229.12 (11 Aug 2008 21:27:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2008 21:27:48 +0000 (UTC) Cc: 688@emacsbugs.donarmstrong.com, Kenichi Handa To: "Chong Yidong" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 11 23:28:38 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KSewM-0007ZP-4c for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Aug 2008 23:28:34 +0200 Original-Received: from localhost ([127.0.0.1]:50443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSevP-0004ly-VW for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Aug 2008 17:27:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSevK-0004ib-8l for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 17:27:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSevI-0004eg-MN for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 17:27:28 -0400 Original-Received: from [199.232.76.173] (port=53051 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSevI-0004eM-13 for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 17:27:28 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:60027) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KSevH-00017l-Dw for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 17:27:27 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7BLROhQ013128; Mon, 11 Aug 2008 14:27:25 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7BLA5ir007546; Mon, 11 Aug 2008 14:10:05 -0700 X-Loop: don@donarmstrong.com Resent-From: "Peter Tury" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 11 Aug 2008 21:10:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 688 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 688-submit@emacsbugs.donarmstrong.com id=B688.12184887216938 (code B ref 688); Mon, 11 Aug 2008 21:10:05 +0000 Original-Received: (at 688) by emacsbugs.donarmstrong.com; 11 Aug 2008 21:05:21 +0000 Original-Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.190]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7BL5GhD006663 for <688@emacsbugs.donarmstrong.com>; Mon, 11 Aug 2008 14:05:17 -0700 Original-Received: by mu-out-0910.google.com with SMTP id w8so3955983mue.1 for <688@emacsbugs.donarmstrong.com>; Mon, 11 Aug 2008 14:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=924B5KtmMfvhXxK82okEyKvh/yzBoFV4z5o4JynNge8=; b=sFclsmZo/K0DuZKTn6lrlTHbwurCOFSfAYkqY9Lc6/tMvOs0B9+Z7kdRlT4BJoMt+8 o0QhKMfFxlfTH3hJPccU12ECRmVsmHh7ZOOWLMknOytNulZNfVtc9Eujjcf78TSCTK81 yD7Or41GrZvCBeopivCkhGPc3ObwXMpEusfAc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=tt3Pw0zOeOkauuxLp1/UkYlEqHRqXJ6oaKhZMCHkcLkQlPz361VNxGKR4oWHIRgxoC yM7HKgHbOCIxLDATEVWNlvmcRrzfreqboa6I4uYHr5Hrc0piA+Tfgk+vvYLRhUcI+Yqi gKBekWzqOArVYblhET9k1YxHCNBI7qolCX8DQ= Original-Received: by 10.103.222.12 with SMTP id z12mr6248064muq.95.1218488715446; Mon, 11 Aug 2008 14:05:15 -0700 (PDT) Original-Received: by 10.102.244.9 with HTTP; Mon, 11 Aug 2008 14:05:15 -0700 (PDT) In-Reply-To: <87r68vfkjp.fsf@stupidchicken.com> Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Mon, 11 Aug 2008 17:27:28 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19299 Archived-At: Hi, now it might not to be so useful, but let me note: I tried emacs -q and set debug-on-error; then I repeated the problematic steps and found that I see the arith-error only if I want to move the point in the half-drawn buffer. E.g. when I pushed some arrow keys I saw in the *Backtrace* buffer this: Debugger entered--Lisp error: (arith-error) pos-visible-in-window-p(t nil t) line-move-partial(1 nil nil) line-move(1 nil nil 1) byte-code("=C2 =C3=09$" [arg try-vscroll line-move nil] 5) next-line(1 1) call-interactively(next-line nil nil) When I tried to "drag" by the mouse I got the attachment. Moreover when I resized the whole frame, the about-emacs buffer (what was active then) became blank (because of lack of redisplay?), but arith-error didn't appear in the *Messages* buffer (or anywhere else) nor the *Backtrace* buffer appeared, even if I turned on debug-on-error previously. Is this OK? Thanks, P 2008/8/11 Chong Yidong : >> $ ./configure --with-gif=3Dno --with-tiff=3Dno --with-xft=3Dno >> $ make bootstrap >> >> Now it seems I could get rid of antialiasing, but `about-emacs' fails: >> I get "Arithmetic error" after the copyright line drawn: > > The arithmetic error was due to a failure of the redisplay engine to > calculate tab widths correctly when the current font's space character > has a width of zero. I've fixed this, but the issue of why the font has > zero space width remains unsolved. > > As a result, the tab widths in `M-x about-emacs' are now zero, which is > an obvious regression from Emacs 22. > > The problem at hand is the following code in ftfont_open > (ftfont.c:1077): > > { > int n; > > font->min_width =3D font->average_width =3D font->space_width =3D 0; > for (i =3D 32, n =3D 0; i < 127; i++) > if (FT_Load_Char (ft_face, i, FT_LOAD_DEFAULT) !=3D 0) > { > int this_width =3D ft_face->glyph->metrics.horiAdvance >> 6; > > if (this_width > 0 > && (! font->min_width || font->min_width > this_width)) > font->min_width =3D this_width; > if (i =3D=3D 32) > font->space_width =3D this_width; > font->average_width +=3D this_width; > n++; > } > > if (n > 0) > font->average_width /=3D n; > } > > For some reason, this gives zero. Handa-san, do you have any insight? >