all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#688: Arithmetic error at 'About Emacs' when --with-xft=no
       [not found] <b5accf970808101354x3921689dnc204016d563ebd4f@mail.gmail.com>
@ 2008-08-10 21:00 ` Peter Tury
  2008-08-11  1:05   ` OFFICE ZERO
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Tury @ 2008-08-10 21:00 UTC (permalink / raw)
  To: emacs-pretest-bug

[-- Attachment #1: Type: text/plain, Size: 4018 bytes --]

Hi,

I am new to Ubuntu and tried to install cvs-emacs first time a few
days ago this way:

$ ./configure --with-gif=no --with-tiff=no
$ make bootstrap

I tried Emacs from src/emacs (i.e. I didn't do make install). It
worked, but I found antialiasing ugly, so today I made this:

$ cvs update -dP
$ ./configure --with-gif=no --with-tiff=no --with-xft=no
$ 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
about-emacs buffer seems to be left half-drawn (it looks similarly as
if I would split the window previously). (See attached picture.) After
this error, window refreshment seems to be "stopped" (by the
Arithmetic error?) until I switch to another buffer; after switching
to another buffer, I have the "half-drown" about-emacs buffer too in
my buffer list: when I try to switch back to it, I get the arithmetic
error again (I took the affached picture after such a switch).

Please let me know if you can't reproduce the problem and need more info.

\bye
P

------------------------

In GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9)
of 2008-08-10 on ubuntu-tury
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
configured using `configure  '--with-gif=no' '--with-tiff=no' '--with-xft=no''

Important settings:
 value of $LC_ALL: nil
 value of $LC_COLLATE: nil
 value of $LC_CTYPE: nil
 value of $LC_MESSAGES: nil
 value of $LC_MONETARY: nil
 value of $LC_NUMERIC: nil
 value of $LC_TIME: nil
 value of $LANG: hu_HU.UTF-8
 value of $XMODIFIERS: nil
 locale-coding-system: utf-8-unix
 default-enable-multibyte-characters: t

Major mode: Fundamental
Minor modes in effect:
 savehist-mode: t
 which-function-mode: t
 show-paren-mode: t
 recentf-mode: t
 iswitchb-mode: t
 icomplete-mode: t
 display-time-mode: t
 desktop-save-mode: t
 tooltip-mode: t
 mouse-wheel-mode: t
 menu-bar-mode: t
 file-name-shadow-mode: t
 global-font-lock-mode: t
 global-auto-composition-mode: t
 auto-encryption-mode: t
 auto-compression-mode: t
 column-number-mode: t
 line-number-mode: t
 transient-mark-mode: t

Recent input:
<help-echo> <down-mouse-1> <mouse-1> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
<help-menu> <about-emacs> <down-mouse-1> <mouse-1>
<down-mouse-1> <drag-mouse-1> <help-echo> <help-echo>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> <help-echo> <down-mouse-1> <mouse-1> <help-echo>
<down-mouse-1> <mouse-1> C-x 0 <up> <up> <down-mouse-1>
<mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1>
C-x 1 <menu-bar> <buffer> C-b <menu-bar> <buffer> C-a
<menu-bar> <buffer> C-f <down-mouse-1> <mouse-1> <help-echo>
<help-echo> <menu-bar> <buffer> C-a <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
<help-menu> <send-emacs-bug-report>

Recent messages:
Loading cc-mode...done
hellow.java has auto save data; consider M-x recover-this-file
Loading info...done
uncompressing parted.info.gz...done
uncompressing parted.info.gz...done
uncompressing parted.info.gz...done
Wrote /home/apa/.emacs.desktop.lock
Desktop: 5 buffers restored.
For information about GNU Emacs and the GNU system, type C-h C-a. [2 times]
Arithmetic error [13 times]
Arithmetic error

[-- Attachment #2: ar-err.png --]
[-- Type: image/png, Size: 101316 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#688: Arithmetic error at 'About Emacs' when --with-xft=no
  2008-08-10 21:00 ` Peter Tury
@ 2008-08-11  1:05   ` OFFICE ZERO
  0 siblings, 0 replies; 7+ messages in thread
From: OFFICE ZERO @ 2008-08-11  1:05 UTC (permalink / raw)
  To: Peter Tury, 688

Do not send me any mail  !
no thank you



----- Original Message ----- 
From: "Peter Tury" <tury.peter@gmail.com>
To: <emacs-pretest-bug@gnu.org>
Sent: Monday, August 11, 2008 6:00 AM
Subject: bug#688: Arithmetic error at 'About Emacs' when --with-xft=no


> Hi,
>
> I am new to Ubuntu and tried to install cvs-emacs first time a few
> days ago this way:
>
> $ ./configure --with-gif=no --with-tiff=no
> $ make bootstrap
>
> I tried Emacs from src/emacs (i.e. I didn't do make install). It
> worked, but I found antialiasing ugly, so today I made this:
>
> $ cvs update -dP
> $ ./configure --with-gif=no --with-tiff=no --with-xft=no
> $ 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
> about-emacs buffer seems to be left half-drawn (it looks similarly as
> if I would split the window previously). (See attached picture.) After
> this error, window refreshment seems to be "stopped" (by the
> Arithmetic error?) until I switch to another buffer; after switching
> to another buffer, I have the "half-drown" about-emacs buffer too in
> my buffer list: when I try to switch back to it, I get the arithmetic
> error again (I took the affached picture after such a switch).
>
> Please let me know if you can't reproduce the problem and need more info.
>
> \bye
> P
>
> ------------------------
>
> In GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9)
> of 2008-08-10 on ubuntu-tury
> Windowing system distributor `The X.Org Foundation', version 11.0.10400090
> configured using `configure  '--with-gif=no' '--with-tiff=no' 
> '--with-xft=no''
>
> Important settings:
> value of $LC_ALL: nil
> value of $LC_COLLATE: nil
> value of $LC_CTYPE: nil
> value of $LC_MESSAGES: nil
> value of $LC_MONETARY: nil
> value of $LC_NUMERIC: nil
> value of $LC_TIME: nil
> value of $LANG: hu_HU.UTF-8
> value of $XMODIFIERS: nil
> locale-coding-system: utf-8-unix
> default-enable-multibyte-characters: t
>
> Major mode: Fundamental
> Minor modes in effect:
> savehist-mode: t
> which-function-mode: t
> show-paren-mode: t
> recentf-mode: t
> iswitchb-mode: t
> icomplete-mode: t
> display-time-mode: t
> desktop-save-mode: t
> tooltip-mode: t
> mouse-wheel-mode: t
> menu-bar-mode: t
> file-name-shadow-mode: t
> global-font-lock-mode: t
> global-auto-composition-mode: t
> auto-encryption-mode: t
> auto-compression-mode: t
> column-number-mode: t
> line-number-mode: t
> transient-mark-mode: t
>
> Recent input:
> <help-echo> <down-mouse-1> <mouse-1> <help-echo> <help-echo>
> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
> <help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
> <help-menu> <about-emacs> <down-mouse-1> <mouse-1>
> <down-mouse-1> <drag-mouse-1> <help-echo> <help-echo>
> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
> <mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1>
> <mouse-1> <help-echo> <down-mouse-1> <mouse-1> <help-echo>
> <down-mouse-1> <mouse-1> C-x 0 <up> <up> <down-mouse-1>
> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1>
> C-x 1 <menu-bar> <buffer> C-b <menu-bar> <buffer> C-a
> <menu-bar> <buffer> C-f <down-mouse-1> <mouse-1> <help-echo>
> <help-echo> <menu-bar> <buffer> C-a <help-echo> <help-echo>
> <help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
> <help-menu> <send-emacs-bug-report>
>
> Recent messages:
> Loading cc-mode...done
> hellow.java has auto save data; consider M-x recover-this-file
> Loading info...done
> uncompressing parted.info.gz...done
> uncompressing parted.info.gz...done
> uncompressing parted.info.gz...done
> Wrote /home/apa/.emacs.desktop.lock
> Desktop: 5 buffers restored.
> For information about GNU Emacs and the GNU system, type C-h C-a. [2 
> times]
> Arithmetic error [13 times]
> Arithmetic error
> 







^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#688: Arithmetic error at 'About Emacs' when --with-xft=no
@ 2008-08-11 18:55 Chong Yidong
  2008-08-11 21:02 ` Peter Tury
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Chong Yidong @ 2008-08-11 18:55 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: Peter Tury, 688

> $ ./configure --with-gif=no --with-tiff=no --with-xft=no
> $ 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 = font->average_width = font->space_width = 0;
      for (i = 32, n = 0; i < 127; i++)
	if (FT_Load_Char (ft_face, i, FT_LOAD_DEFAULT) != 0)
	  {
	    int this_width = ft_face->glyph->metrics.horiAdvance >> 6;

	    if (this_width > 0
		&& (! font->min_width || font->min_width > this_width))
	      font->min_width = this_width;
	    if (i == 32)
	      font->space_width = this_width;
	    font->average_width += this_width;
	    n++;
	  }

      if (n > 0)
	font->average_width /= n;
    }

For some reason, this gives zero.  Handa-san, do you have any insight?






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#688: Arithmetic error at 'About Emacs' when --with-xft=no
  2008-08-11 18:55 bug#688: Arithmetic error at 'About Emacs' when --with-xft=no Chong Yidong
@ 2008-08-11 21:02 ` Peter Tury
  2008-08-11 21:04 ` Peter Tury
  2008-08-11 21:05 ` Peter Tury
  2 siblings, 0 replies; 7+ messages in thread
From: Peter Tury @ 2008-08-11 21:02 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 688, Kenichi Handa

[-- Attachment #1: Type: text/plain, Size: 2440 bytes --]

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("Â Ã	$" [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 <cyd@stupidchicken.com>:
>> $ ./configure --with-gif=no --with-tiff=no --with-xft=no
>> $ 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 = font->average_width = font->space_width = 0;
>      for (i = 32, n = 0; i < 127; i++)
>        if (FT_Load_Char (ft_face, i, FT_LOAD_DEFAULT) != 0)
>          {
>            int this_width = ft_face->glyph->metrics.horiAdvance >> 6;
>
>            if (this_width > 0
>                && (! font->min_width || font->min_width > this_width))
>              font->min_width = this_width;
>            if (i == 32)
>              font->space_width = this_width;
>            font->average_width += this_width;
>            n++;
>          }
>
>      if (n > 0)
>        font->average_width /= n;
>    }
>
> For some reason, this gives zero.  Handa-san, do you have any insight?
>

[-- Attachment #2: ar-err.txt --]
[-- Type: text/plain, Size: 2103 bytes --]

Debugger entered--Lisp error: (arith-error)
  read-event()
  byte-code("Æ ‰\x10‰\x19¢)Ç=„\x14\0\b¢È>…Ä\0\b¢É>„\0\0\n^[Ê ˆ)\b‰\x18:ƒ9\0Ë\b8:ƒ3\0Ë‚4\0Ì\b8‚?\0Í `ÎÏF)‰\x14\x1dÐ\r8†Z\0\rA@:ƒW\0\rA@@‚Z\0\rA@)‰\x16\x15§ƒf\0\x0e\x15\x16\x16\f‰\x1d@)\x0e\x17=ƒ†\0Ñ\x0e\x15!ƒ†\0Ò\x0e\x18\x0e\x19\x0e\x15\x0e\x1a$ˆ‚\0\0Ó AA‰\x1e^[ƒÀ\0\x0e^[\x0e\x1cWƒ©\0Ô\x0e\x17\x0e^[\x0e\x1cZ\x0e\x18\x0e\x19$ˆ‚À\0\x0e^[\x0e\x1dYƒÀ\0Ô\x0e\x17\x0e^[\x0e\x1dZT\x0e\x18\x0e\x19$ˆ)‚\0\0‡" [event object automatic-hscrolling-saved automatic-hscrolling end position read-event mouse-movement (switch-frame select-window) (switch-frame select-window) redisplay 2 1 selected-window (0 . 0) 0 5 integer-or-marker-p mouse-move-drag-overlay mouse-position mouse-scroll-subr end-point last-end-point start-window mouse-drag-overlay start-point click-count mouse-row top bottom] 6)
  (track-mouse (byte-code "Æ ‰\x10‰\x19¢)Ç=„\x14\0\b¢È>…Ä\0\b¢É>„\0\0\n^[Ê ˆ)\b‰\x18:ƒ9\0Ë\b8:ƒ3\0Ë‚4\0Ì\b8‚?\0Í `ÎÏF)‰\x14\x1dÐ\r8†Z\0\rA@:ƒW\0\rA@@‚Z\0\rA@)‰\x16\x15§ƒf\0\x0e\x15\x16\x16\f‰\x1d@)\x0e\x17=ƒ†\0Ñ\x0e\x15!ƒ†\0Ò\x0e\x18\x0e\x19\x0e\x15\x0e\x1a$ˆ‚\0\0Ó AA‰\x1e^[ƒÀ\0\x0e^[\x0e\x1cWƒ©\0Ô\x0e\x17\x0e^[\x0e\x1cZ\x0e\x18\x0e\x19$ˆ‚À\0\x0e^[\x0e\x1dYƒÀ\0Ô\x0e\x17\x0e^[\x0e\x1dZT\x0e\x18\x0e\x19$ˆ)‚\0\0‡" [event object automatic-hscrolling-saved automatic-hscrolling end position read-event mouse-movement ... ... redisplay 2 1 selected-window ... 0 5 integer-or-marker-p mouse-move-drag-overlay mouse-position mouse-scroll-subr end-point last-end-point start-window mouse-drag-overlay start-point click-count mouse-row top bottom] 6))
  (lambda nil (track-mouse (byte-code "Æ ‰\x10‰\x19¢)Ç=„\x14\0\b¢È>…Ä\0\b¢É>„\0\0\n^[Ê ˆ)\b‰\x18:ƒ9\0Ë\b8:ƒ3\0Ë‚4\0Ì\b8‚?\0Í `ÎÏF)‰\x14\x1dÐ\r8†Z\0\rA@:ƒW\0\rA@@‚Z\0\rA@)‰\x16\x15§ƒf\0\x0e\x15\x16\x16\f‰\x1d@)\x0e\x17=ƒ†\0Ñ\x0e\x15!ƒ†\0Ò\x0e\x18\x0e\x19\x0e\x15\x0e\x1a$ˆ‚\0\0Ó AA‰\x1e^[ƒÀ\0\x0e^[\x0e\x1cWƒ©\0Ô\x0e\x17\x0e^[\x0e\x1cZ\x0e\x18\x0e\x19$ˆ‚À\0\x0e^[\x0e\x1dYƒÀ\0Ô\x0e\x17\x0e^[\x0e\x1dZT\x0e\x18\x0e\x19$ˆ)‚\0\0‡" [event object automatic-hscrolling-saved automatic-hscrolling end position read-event mouse-movement ... ... redisplay 2 1 selected-window ... 0 5 integer-or-marker-p mouse-move-drag-overlay mouse-position mouse-scroll-subr end-point last-end-point start-window mouse-drag-overlay start-point click-count mouse-row top bottom] 6)))()
  mouse-drag-track((down-mouse-1 (#<window 3 on *About GNU Emacs*> 189 (173 . 310) 2128840 nil 189 (24 . 6) nil (4 . 2) (0 . 0))) t)
  mouse-drag-region((down-mouse-1 (#<window 3 on *About GNU Emacs*> 189 (173 . 310) 2128840 nil 189 (24 . 6) nil (4 . 2) (0 . 0))))
  call-interactively(mouse-drag-region nil nil)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#688: Arithmetic error at 'About Emacs' when --with-xft=no
  2008-08-11 18:55 bug#688: Arithmetic error at 'About Emacs' when --with-xft=no Chong Yidong
  2008-08-11 21:02 ` Peter Tury
@ 2008-08-11 21:04 ` Peter Tury
  2008-08-11 21:05 ` Peter Tury
  2 siblings, 0 replies; 7+ messages in thread
From: Peter Tury @ 2008-08-11 21:04 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 688, Kenichi Handa

[-- Attachment #1: Type: text/plain, Size: 2440 bytes --]

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("Â Ã	$" [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 <cyd@stupidchicken.com>:
>> $ ./configure --with-gif=no --with-tiff=no --with-xft=no
>> $ 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 = font->average_width = font->space_width = 0;
>      for (i = 32, n = 0; i < 127; i++)
>        if (FT_Load_Char (ft_face, i, FT_LOAD_DEFAULT) != 0)
>          {
>            int this_width = ft_face->glyph->metrics.horiAdvance >> 6;
>
>            if (this_width > 0
>                && (! font->min_width || font->min_width > this_width))
>              font->min_width = this_width;
>            if (i == 32)
>              font->space_width = this_width;
>            font->average_width += this_width;
>            n++;
>          }
>
>      if (n > 0)
>        font->average_width /= n;
>    }
>
> For some reason, this gives zero.  Handa-san, do you have any insight?
>

[-- Attachment #2: ar-err.txt --]
[-- Type: text/plain, Size: 2103 bytes --]

Debugger entered--Lisp error: (arith-error)
  read-event()
  byte-code("Æ ‰\x10‰\x19¢)Ç=„\x14\0\b¢È>…Ä\0\b¢É>„\0\0\n^[Ê ˆ)\b‰\x18:ƒ9\0Ë\b8:ƒ3\0Ë‚4\0Ì\b8‚?\0Í `ÎÏF)‰\x14\x1dÐ\r8†Z\0\rA@:ƒW\0\rA@@‚Z\0\rA@)‰\x16\x15§ƒf\0\x0e\x15\x16\x16\f‰\x1d@)\x0e\x17=ƒ†\0Ñ\x0e\x15!ƒ†\0Ò\x0e\x18\x0e\x19\x0e\x15\x0e\x1a$ˆ‚\0\0Ó AA‰\x1e^[ƒÀ\0\x0e^[\x0e\x1cWƒ©\0Ô\x0e\x17\x0e^[\x0e\x1cZ\x0e\x18\x0e\x19$ˆ‚À\0\x0e^[\x0e\x1dYƒÀ\0Ô\x0e\x17\x0e^[\x0e\x1dZT\x0e\x18\x0e\x19$ˆ)‚\0\0‡" [event object automatic-hscrolling-saved automatic-hscrolling end position read-event mouse-movement (switch-frame select-window) (switch-frame select-window) redisplay 2 1 selected-window (0 . 0) 0 5 integer-or-marker-p mouse-move-drag-overlay mouse-position mouse-scroll-subr end-point last-end-point start-window mouse-drag-overlay start-point click-count mouse-row top bottom] 6)
  (track-mouse (byte-code "Æ ‰\x10‰\x19¢)Ç=„\x14\0\b¢È>…Ä\0\b¢É>„\0\0\n^[Ê ˆ)\b‰\x18:ƒ9\0Ë\b8:ƒ3\0Ë‚4\0Ì\b8‚?\0Í `ÎÏF)‰\x14\x1dÐ\r8†Z\0\rA@:ƒW\0\rA@@‚Z\0\rA@)‰\x16\x15§ƒf\0\x0e\x15\x16\x16\f‰\x1d@)\x0e\x17=ƒ†\0Ñ\x0e\x15!ƒ†\0Ò\x0e\x18\x0e\x19\x0e\x15\x0e\x1a$ˆ‚\0\0Ó AA‰\x1e^[ƒÀ\0\x0e^[\x0e\x1cWƒ©\0Ô\x0e\x17\x0e^[\x0e\x1cZ\x0e\x18\x0e\x19$ˆ‚À\0\x0e^[\x0e\x1dYƒÀ\0Ô\x0e\x17\x0e^[\x0e\x1dZT\x0e\x18\x0e\x19$ˆ)‚\0\0‡" [event object automatic-hscrolling-saved automatic-hscrolling end position read-event mouse-movement ... ... redisplay 2 1 selected-window ... 0 5 integer-or-marker-p mouse-move-drag-overlay mouse-position mouse-scroll-subr end-point last-end-point start-window mouse-drag-overlay start-point click-count mouse-row top bottom] 6))
  (lambda nil (track-mouse (byte-code "Æ ‰\x10‰\x19¢)Ç=„\x14\0\b¢È>…Ä\0\b¢É>„\0\0\n^[Ê ˆ)\b‰\x18:ƒ9\0Ë\b8:ƒ3\0Ë‚4\0Ì\b8‚?\0Í `ÎÏF)‰\x14\x1dÐ\r8†Z\0\rA@:ƒW\0\rA@@‚Z\0\rA@)‰\x16\x15§ƒf\0\x0e\x15\x16\x16\f‰\x1d@)\x0e\x17=ƒ†\0Ñ\x0e\x15!ƒ†\0Ò\x0e\x18\x0e\x19\x0e\x15\x0e\x1a$ˆ‚\0\0Ó AA‰\x1e^[ƒÀ\0\x0e^[\x0e\x1cWƒ©\0Ô\x0e\x17\x0e^[\x0e\x1cZ\x0e\x18\x0e\x19$ˆ‚À\0\x0e^[\x0e\x1dYƒÀ\0Ô\x0e\x17\x0e^[\x0e\x1dZT\x0e\x18\x0e\x19$ˆ)‚\0\0‡" [event object automatic-hscrolling-saved automatic-hscrolling end position read-event mouse-movement ... ... redisplay 2 1 selected-window ... 0 5 integer-or-marker-p mouse-move-drag-overlay mouse-position mouse-scroll-subr end-point last-end-point start-window mouse-drag-overlay start-point click-count mouse-row top bottom] 6)))()
  mouse-drag-track((down-mouse-1 (#<window 3 on *About GNU Emacs*> 189 (173 . 310) 2128840 nil 189 (24 . 6) nil (4 . 2) (0 . 0))) t)
  mouse-drag-region((down-mouse-1 (#<window 3 on *About GNU Emacs*> 189 (173 . 310) 2128840 nil 189 (24 . 6) nil (4 . 2) (0 . 0))))
  call-interactively(mouse-drag-region nil nil)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#688: Arithmetic error at 'About Emacs' when --with-xft=no
  2008-08-11 18:55 bug#688: Arithmetic error at 'About Emacs' when --with-xft=no Chong Yidong
  2008-08-11 21:02 ` Peter Tury
  2008-08-11 21:04 ` Peter Tury
@ 2008-08-11 21:05 ` Peter Tury
  2008-09-03 20:23   ` Peter Tury
  2 siblings, 1 reply; 7+ messages in thread
From: Peter Tury @ 2008-08-11 21:05 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 688, Kenichi Handa

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("Â Ã	$" [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 <cyd@stupidchicken.com>:
>> $ ./configure --with-gif=no --with-tiff=no --with-xft=no
>> $ 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 = font->average_width = font->space_width = 0;
>      for (i = 32, n = 0; i < 127; i++)
>        if (FT_Load_Char (ft_face, i, FT_LOAD_DEFAULT) != 0)
>          {
>            int this_width = ft_face->glyph->metrics.horiAdvance >> 6;
>
>            if (this_width > 0
>                && (! font->min_width || font->min_width > this_width))
>              font->min_width = this_width;
>            if (i == 32)
>              font->space_width = this_width;
>            font->average_width += this_width;
>            n++;
>          }
>
>      if (n > 0)
>        font->average_width /= n;
>    }
>
> For some reason, this gives zero.  Handa-san, do you have any insight?
>






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#688: Arithmetic error at 'About Emacs' when --with-xft=no
  2008-08-11 21:05 ` Peter Tury
@ 2008-09-03 20:23   ` Peter Tury
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Tury @ 2008-09-03 20:23 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 688, Kenichi Handa

Hi,

FYI
today I made

cvs update -dP
make maintainer-clean
./configure --with-xft=no
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 <tury.peter@gmail.com>:
> 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("Â Ã        $" [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 <cyd@stupidchicken.com>:
>>> $ ./configure --with-gif=no --with-tiff=no --with-xft=no
>>> $ 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 = font->average_width = font->space_width = 0;
>>      for (i = 32, n = 0; i < 127; i++)
>>        if (FT_Load_Char (ft_face, i, FT_LOAD_DEFAULT) != 0)
>>          {
>>            int this_width = ft_face->glyph->metrics.horiAdvance >> 6;
>>
>>            if (this_width > 0
>>                && (! font->min_width || font->min_width > this_width))
>>              font->min_width = this_width;
>>            if (i == 32)
>>              font->space_width = this_width;
>>            font->average_width += this_width;
>>            n++;
>>          }
>>
>>      if (n > 0)
>>        font->average_width /= n;
>>    }
>>
>> For some reason, this gives zero.  Handa-san, do you have any insight?
>>
>






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-09-03 20:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-11 18:55 bug#688: Arithmetic error at 'About Emacs' when --with-xft=no Chong Yidong
2008-08-11 21:02 ` Peter Tury
2008-08-11 21:04 ` Peter Tury
2008-08-11 21:05 ` Peter Tury
2008-09-03 20:23   ` Peter Tury
     [not found] <b5accf970808101354x3921689dnc204016d563ebd4f@mail.gmail.com>
2008-08-10 21:00 ` Peter Tury
2008-08-11  1:05   ` OFFICE ZERO

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.