unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* crash: divide by 0
@ 2005-01-03 15:58 Sam Steingold
  2005-01-03 16:28 ` B. Anyos
  2005-01-03 17:00 ` Luc Teirlinck
  0 siblings, 2 replies; 6+ messages in thread
From: Sam Steingold @ 2005-01-03 15:58 UTC (permalink / raw)


GNU Emacs 21.3.50.1 (i386-msvc-nt5.0.2195)
 of 2005-01-03 on WINSTEINGOLDLAP
--with-msvc (12.00)

with the current CVS HEAD I am getting consistent crashes (division by
0) in xdisp.c:19222 (apparently "tab_width" is 0)

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Why do we want intelligent terminals when there are so many stupid users?

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

* Re: crash: divide by 0
  2005-01-03 15:58 crash: divide by 0 Sam Steingold
@ 2005-01-03 16:28 ` B. Anyos
  2005-01-03 17:05   ` B. Anyos
  2005-01-03 17:00 ` Luc Teirlinck
  1 sibling, 1 reply; 6+ messages in thread
From: B. Anyos @ 2005-01-03 16:28 UTC (permalink / raw)
  Cc: sds

I can confirm this, too.
I had a CVS update and a 'make bootstrap' today.
To reproduce the problem just try to load a file.
It crashes every time.
I also have a Windows client. Does this happen on other platform(s) ?

Regards,
  Bela

Here's the stack dump:

--------------------------
x_produce_glyphs(it * 0x0009f010) line 19222 + 4 bytes
display_line(it * 0x00000060) line 14775 + 13 bytes
try_window(int -2127184384, text_pos {...}) line 12387 + 12 bytes
redisplay_window(int -2127184384, int 0) line 12027 + 10 bytes
redisplay_window_0(int -2127184384) line 10698 + 10 bytes
internal_condition_case_1(int (void)* 0x01050f61 
redisplay_window_0(int), int -2127184384, int -1590823544, int (void)* 
0x01050f4a redisplay_window_error(void)) line 1426 + 53 bytes
redisplay_windows(int -2127184384) line 10679 + 29 bytes
redisplay_internal(int 0) line 10259 + 8 bytes
redisplay() line 9489 + 7 bytes
read_char(int 1, int 9, int * 0x0082fc7c, int 556606464, int * 
0x0082fce0) line 2539
read_key_sequence(int * 0x0082fd7c, int 30, int 556606464, int 0, int 1, 
int 1) line 8820 + 36 bytes
command_loop_1() line 1532 + 40 bytes
internal_condition_case(int (void)* 0x0100e792 command_loop_1(void), int 
556692080, int (void)* 0x0100e3e9 cmd_error(void)) line 1386
command_loop_2() line 1308 + 21 bytes
internal_catch(int 556688344, int (void)* 0x0100e65d 
command_loop_2(void), int 556606464) line 1144 + 6 bytes
command_loop() line 1292
recursive_edit_1() line 984 + 5 bytes
Frecursive_edit() line 1046
main() line 1763 + 5 bytes
EMACS! mainCRTStartup + 180 bytes
KERNEL32! 77e8141a()
--------------------------

Sam Steingold said the following on 1/3/2005 16:58 PM:
> GNU Emacs 21.3.50.1 (i386-msvc-nt5.0.2195)
>  of 2005-01-03 on WINSTEINGOLDLAP
> --with-msvc (12.00)
> 
> with the current CVS HEAD I am getting consistent crashes (division by
> 0) in xdisp.c:19222 (apparently "tab_width" is 0)
> 

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

* Re: crash: divide by 0
  2005-01-03 15:58 crash: divide by 0 Sam Steingold
  2005-01-03 16:28 ` B. Anyos
@ 2005-01-03 17:00 ` Luc Teirlinck
  1 sibling, 0 replies; 6+ messages in thread
From: Luc Teirlinck @ 2005-01-03 17:00 UTC (permalink / raw)
  Cc: emacs-devel

Sam Steingold wrote:

   GNU Emacs 21.3.50.1 (i386-msvc-nt5.0.2195)
    of 2005-01-03 on WINSTEINGOLDLAP
   --with-msvc (12.00)

   with the current CVS HEAD I am getting consistent crashes (division by
   0) in xdisp.c:19222 (apparently "tab_width" is 0)

On GNU/Linux, tab-width is 8 by default.

Bela Anyos wrote:

   I can confirm this, too.
   I had a CVS update and a 'make bootstrap' today.
   To reproduce the problem just try to load a file.
   It crashes every time.
   I also have a Windows client. Does this happen on other platform(s) ?

You mean `M-x load-library RET edebug RET' in `emacs -q' produces a crash?
Does not happen for me on GNU/Linux.

So, at first view, it looks like an MS Windows specific problem.

Sincerely,

Luc.

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

* Re: crash: divide by 0
  2005-01-03 16:28 ` B. Anyos
@ 2005-01-03 17:05   ` B. Anyos
  2005-01-04  0:52     ` Kenichi Handa
  0 siblings, 1 reply; 6+ messages in thread
From: B. Anyos @ 2005-01-03 17:05 UTC (permalink / raw)
  Cc: sds

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 ?

Bela


B. Anyos said the following on 1/3/2005 17:28 PM:
> I can confirm this, too.
> I had a CVS update and a 'make bootstrap' today.
> To reproduce the problem just try to load a file.
> It crashes every time.
> I also have a Windows client. Does this happen on other platform(s) ?
> 
> Regards,
>  Bela
> 
> Here's the stack dump:
> 
> --------------------------
> x_produce_glyphs(it * 0x0009f010) line 19222 + 4 bytes
> display_line(it * 0x00000060) line 14775 + 13 bytes
> try_window(int -2127184384, text_pos {...}) line 12387 + 12 bytes
> redisplay_window(int -2127184384, int 0) line 12027 + 10 bytes
> redisplay_window_0(int -2127184384) line 10698 + 10 bytes
> internal_condition_case_1(int (void)* 0x01050f61 
> redisplay_window_0(int), int -2127184384, int -1590823544, int (void)* 
> 0x01050f4a redisplay_window_error(void)) line 1426 + 53 bytes
> redisplay_windows(int -2127184384) line 10679 + 29 bytes
> redisplay_internal(int 0) line 10259 + 8 bytes
> redisplay() line 9489 + 7 bytes
> read_char(int 1, int 9, int * 0x0082fc7c, int 556606464, int * 
> 0x0082fce0) line 2539
> read_key_sequence(int * 0x0082fd7c, int 30, int 556606464, int 0, int 1, 
> int 1) line 8820 + 36 bytes
> command_loop_1() line 1532 + 40 bytes
> internal_condition_case(int (void)* 0x0100e792 command_loop_1(void), int 
> 556692080, int (void)* 0x0100e3e9 cmd_error(void)) line 1386
> command_loop_2() line 1308 + 21 bytes
> internal_catch(int 556688344, int (void)* 0x0100e65d 
> command_loop_2(void), int 556606464) line 1144 + 6 bytes
> command_loop() line 1292
> recursive_edit_1() line 984 + 5 bytes
> Frecursive_edit() line 1046
> main() line 1763 + 5 bytes
> EMACS! mainCRTStartup + 180 bytes
> KERNEL32! 77e8141a()
> --------------------------
> 
> Sam Steingold said the following on 1/3/2005 16:58 PM:
> 
>> GNU Emacs 21.3.50.1 (i386-msvc-nt5.0.2195)
>>  of 2005-01-03 on WINSTEINGOLDLAP
>> --with-msvc (12.00)
>>
>> with the current CVS HEAD I am getting consistent crashes (division by
>> 0) in xdisp.c:19222 (apparently "tab_width" is 0)
>>
> 
> 
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
> 
> 

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

* Re: crash: divide by 0
  2005-01-03 17:05   ` B. Anyos
@ 2005-01-04  0:52     ` Kenichi Handa
  2005-01-04  8:50       ` B. Anyos
  0 siblings, 1 reply; 6+ messages in thread
From: Kenichi Handa @ 2005-01-04  0:52 UTC (permalink / raw)
  Cc: sds, emacs-devel

In article <41D97B49.2000702@freemail.hu>, "B. Anyos" <banyos@freemail.hu> 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  <jasonr@gnu.org>

	* 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  <mituharu@math.s.chiba-u.ac.jp>

	* 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

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

* Re: crash: divide by 0
  2005-01-04  0:52     ` Kenichi Handa
@ 2005-01-04  8:50       ` B. Anyos
  0 siblings, 0 replies; 6+ messages in thread
From: B. Anyos @ 2005-01-04  8:50 UTC (permalink / raw)
  Cc: sds, Kenichi Handa


> 
> So, I think you are using Emacs on Mac or Windows.  And, as
> I found these changelogs in today's emacs:

That's true. However I updated my files on 2005-01-03. Probably
the fix got into CVS later that day.

> 
> 2005-01-03  Jason Rumney  <jasonr@gnu.org>
> 
> 	* 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  <mituharu@math.s.chiba-u.ac.jp>
> 
> 	* 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.
>

This is also correct. With these changes the crash didn't appear again.
So problem solved. Thanks.

> ---
> Ken'ichi HANDA
> handa@m17n.org
> 
> 

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

end of thread, other threads:[~2005-01-04  8:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-03 15:58 crash: divide by 0 Sam Steingold
2005-01-03 16:28 ` B. Anyos
2005-01-03 17:05   ` B. Anyos
2005-01-04  0:52     ` Kenichi Handa
2005-01-04  8:50       ` B. Anyos
2005-01-03 17:00 ` Luc Teirlinck

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).