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: Wed, 3 Sep 2008 22:23:28 +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 1220474937 16502 80.91.229.12 (3 Sep 2008 20:48:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Sep 2008 20:48:57 +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 Wed Sep 03 22:49:51 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 1KazI4-0002zu-0X for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Sep 2008 22:49:24 +0200 Original-Received: from localhost ([127.0.0.1]:57397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KazH4-0001l3-TL for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Sep 2008 16:48:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KazGW-0001Vb-B1 for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2008 16:47:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KazGP-0001TH-GQ for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2008 16:47:46 -0400 Original-Received: from [199.232.76.173] (port=38042 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KazGP-0001TE-AU for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2008 16:47:41 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:45557) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KazGO-00086d-3N for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2008 16:47:41 -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 m83KlVUM009058; Wed, 3 Sep 2008 13:47:31 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m83KU4ia002663; Wed, 3 Sep 2008 13:30:04 -0700 X-Loop: don@donarmstrong.com Resent-From: "Peter Tury" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 03 Sep 2008 20:30:04 +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.1220473414681 (code B ref 688); Wed, 03 Sep 2008 20:30:04 +0000 Original-Received: (at 688) by emacsbugs.donarmstrong.com; 3 Sep 2008 20:23:34 +0000 Original-Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.188]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83KNTNR000671 for <688@emacsbugs.donarmstrong.com>; Wed, 3 Sep 2008 13:23:31 -0700 Original-Received: by gv-out-0910.google.com with SMTP id y18so103025gvf.14 for <688@emacsbugs.donarmstrong.com>; Wed, 03 Sep 2008 13:23:28 -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=6AZWPJqL6nDte2GpdcLeRFKTXQ7f4kmVnkirFMxOzac=; b=fXn+fN5mtp1VK62hSda3nXWorQzmgzFjUMsMuYrWfF6FpUsYzjELSVvb34Lom04nzR 3PyGu93aiPQol2GC9gaL/9A9UWtNdCR53Jtkj6Oyc+s1V3XZ8RDuIHVGJtLbolvcCtbD zEUOBtvBuCzJXw4/AzotEpXLffddD+s6RkKNw= 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=mIhQq5QSwvJJz3AF4xdTYoZifhksC/0j3c89uuG1gxuJAW7r+5DOz4abdDwkNewZ8S /O8zHKC0RWpXF8J/YGzi1XdbMW3l8CNB6xtBYFNODTmftM+deJeI8JodZSBvrvYjTwY5 LOXhLFs+urkEqAPsx7dD1NxLUXZyLkOD/D5yc= Original-Received: by 10.103.206.4 with SMTP id i4mr6665505muq.69.1220473408402; Wed, 03 Sep 2008 13:23:28 -0700 (PDT) Original-Received: by 10.103.16.3 with HTTP; Wed, 3 Sep 2008 13:23:28 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Wed, 03 Sep 2008 16:47:46 -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:20107 Archived-At: Hi, FYI today I made cvs update -dP make maintainer-clean ./configure --with-xft=3Dno make bootstrap and the error doesn't show up in this freshly compiled Emacs (e.g. About buffer is drawn well). \bye P 2008/8/11 Peter Tury : > 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 $" [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? >> >