Subject: bug#11850: crash (null font) running emacs built from git

From: Yotam Medini יותם מדיני<[email-masked]>
Date: Tue, 3 Jul 2012 14:27:16 +0300

Just pulled from git repository and cleanly built.
Then, when running emacs, a windows is opened for a fraction of second,
followed by a crash.

Here's a log of running within gdb:

Script started on Tue 03 Jul 2012 02:06:28 PM IDT
yotamm@hubby:~/pub/emacs$ gdb /usr/local/bin/emacs
GNU gdb (GDB) 7.4-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/emacs...done.
(gdb) run
Starting program: /usr/local/bin/emacs
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x080f1333 in x_draw_glyph_string_background (force_p=1, s=0xbfffdbe0)
    at xterm.c:1210
1210      else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
(gdb) print s->font
$1 = (struct font *) 0x0
(gdb) print *s
$2 = {x = 82, y = 631, ybase = 649, width = 288, background_width = 288,
  height = 25, left_overhang = 0, right_overhang = 0, f = 0x870c9d0,
  w = 0x86ad5c0, display = 0x8806150, window = 60817598, row = 0x8822d6c,
  area = TEXT_AREA, char2b = 0x0, nchars = 12, hl = DRAW_NORMAL_TEXT,
  face = 0x87f6418, font = 0x0, cmp = 0x0, cmp_id = 0, cmp_from = 0,
  cmp_to = 0, extends_to_end_of_line_p = 0, background_filled_p = 0,
  two_byte_p = 0, font_not_found_p = 0, stippled_p = 0, for_overlaps = 0,
  padding_p = 0, gc = 0x88253f0, first_glyph = 0x8471280, img = 0x0, slice
= {
    x = 0, y = 0, width = 0, height = 0}, clip_head = 0x0, clip_tail = 0x0,
  clip = {{x = 1, y = 631, width = 840, height = 25}, {x = 0, y = 0, width
= 0,
      height = 0}}, num_clips = 1, underline_position = 0,
  underline_thickness = 0, next = 0xbfffdb30, prev = 0xbfffdd30}
(gdb) where
#0  0x080f1333 in x_draw_glyph_string_background (force_p=1, s=0xbfffdbe0)
    at xterm.c:1210
#1  x_draw_glyph_string_background (s=0xbfffdbe0, force_p=<optimized out>)
    at xterm.c:1191
#2  0x080f464f in x_draw_glyph_string (s=0xbfffdbe0) at xterm.c:2814
#3  0x08089bc7 in draw_glyphs (w=0x86ad5c0, x=850, row=0x8822d6c,
    area=TEXT_AREA, start=0, end=68, hl=DRAW_NORMAL_TEXT, overlaps=0)
    at xdisp.c:23404
#4  0x0808e72f in x_write_glyphs (start=0x8471160, len=68) at xdisp.c:25046
#5  0x080559b4 in update_text_area (vpos=37, w=0x86ad5c0) at dispnew.c:3773
#6  update_window_line (w=0x86ad5c0, vpos=37,
    mouse_face_overwritten_p=0xbfffe03c) at dispnew.c:4014
#7  0x08057373 in update_window (w=0x86ad5c0, force_p=1) at dispnew.c:3575
#8  0x080584a9 in update_window_tree (w=0x86ad5c0, force_p=1) at
dispnew.c:3340
#9  0x0805b3b6 in update_frame (f=0x870c9d0, force_p=1,
inhibit_hairy_id_p=1)
    at dispnew.c:3269
#10 0x0808402c in echo_area_display (update_frame_p=<optimized out>)
    at xdisp.c:10752
#11 0x0808425f in message3_nolog (m=142981265, nbytes=65, multibyte=0)
    at xdisp.c:9628
#12 0x0808440f in message3 (m=142981265, nbytes=65, multibyte=0) at
xdisp.c:9565
#13 0x08187bdc in Fmessage (nargs=2, args=0xbfffe2b8) at editfns.c:3436
#14 0x08190483 in Ffuncall (nargs=3, args=0xbfffe2b4) at eval.c:2802
#15 0x081c6252 in exec_byte_code (bytestr=<optimized out>,
vector=136954405,
    maxdepth=24, args_template=0, nargs=0, args=<optimized out>)
    at bytecode.c:784
#16 0x0818ff4b in funcall_lambda (fun=136954357, nargs=0,
arg_vector=0xbfffe43c)
    at eval.c:2986
#17 0x0819020b in Ffuncall (nargs=1, args=0xbfffe438) at eval.c:2881
#18 0x081c6252 in exec_byte_code (bytestr=<optimized out>,
vector=136954997,
    maxdepth=88, args_template=1028, nargs=1, args=<optimized out>)
    at bytecode.c:784
#19 0x0818ff4b in funcall_lambda (fun=136954949, nargs=1,
arg_vector=0xbfffe5f8)
    at eval.c:2986
#20 0x0819020b in Ffuncall (nargs=2, args=0xbfffe5f4) at eval.c:2881
#21 0x081c6252 in exec_byte_code (bytestr=<optimized out>,
vector=136940917,
    maxdepth=72, args_template=0, nargs=0, args=<optimized out>)
    at bytecode.c:784
#22 0x0818ff4b in funcall_lambda (fun=136940869, nargs=0,
arg_vector=0xbfffe7ac)
    at eval.c:2986
#23 0x0819020b in Ffuncall (nargs=1, args=0xbfffe7a8) at eval.c:2881
---Type <return> to continue, or q <return> to quit---
#24 0x081c6252 in exec_byte_code (bytestr=<optimized out>,
vector=136939381,
    maxdepth=32, args_template=0, nargs=0, args=<optimized out>)
    at bytecode.c:784
#25 0x0818ff4b in funcall_lambda (fun=136939333, nargs=0,
arg_vector=0xbfffe8c0)
    at eval.c:2986
#26 0x0818f3d7 in apply_lambda (fun=136939333, args=<optimized out>)
    at eval.c:2929
#27 0x0818f65d in eval_sub (form=140358414) at eval.c:2231
#28 0x08191ec3 in Feval (form=140358414, lexical=138694826) at eval.c:2021
#29 0x08121e19 in top_level_2 () at keyboard.c:1164
#30 0x0818e97d in internal_condition_case (bfun=0x8121e00 <top_level_2>,
    handlers=138728354, hfun=0x81238f0 <cmd_error>) at eval.c:1333
#31 0x08122465 in top_level_1 (ignore=138694826) at keyboard.c:1172
#32 0x0818e899 in internal_catch (tag=138726330, func=0x8122400
<top_level_1>,
    arg=138694826) at eval.c:1090
#33 0x0812341c in command_loop () at keyboard.c:1127
#34 recursive_edit_1 () at keyboard.c:754
#35 0x0812372f in Frecursive_edit () at keyboard.c:818
#36 0x08051dab in main (argc=2,
    argv=<error reading variable: Cannot access memory at address 0x1d>)
    at emacs.c:1693
(gdb) quit
A debugging session is active.

Inferior 1 [process 3158] will be killed.

Quit anyway? (y or n) y
yotamm@hubby:~/pub/emacs$ exit
exit

Script done on Tue 03 Jul 2012 02:07:47 PM IDT