GNU bug report logs - #11813
Segmentation fault on launch related to x_draw_glyph_string_background

Previous Next

Package: emacs;

Reported by: Left Right <olegsivokon <at> gmail.com>

Date: Fri, 29 Jun 2012 02:30:02 UTC

Severity: normal

Merged with 11850

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11813 in the body.
You can then email your comments to 11813 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Fri, 29 Jun 2012 02:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Left Right <olegsivokon <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 29 Jun 2012 02:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Left Right <olegsivokon <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Segmentation fault on launch related to x_draw_glyph_string_background
Date: Fri, 29 Jun 2012 05:25:26 +0300
Hello,
I've built 24.1 release and the latest version from git repository.
Both exhibit same behavior:


wvxvw <at> wvxvw-desktop:~/projects/emacs-sources/emacs/src$ gdb ./emacs
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/wvxvw/projects/emacs-sources/emacs/src/emacs...done.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not
from terminal]
DISPLAY = :0.0
TERM = xterm
Breakpoint 1 at 0x4e1e40: file emacs.c, line 390.
Temporary breakpoint 2 at 0x500050: file sysdep.c, line 843.
(gdb) run -q
Starting program: /home/wvxvw/projects/emacs-sources/emacs/src/emacs -q
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
x_draw_glyph_string_background (s=0x7fffffffcb60, force_p=1) at xterm.c:1210
1210          else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
(gdb) c
Continuing.
Fatal error (11)
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff548a497 in kill () from /lib/libc.so.6
(gdb) q


Things that might need clarification:
- I try to avoid AA fonts everywhere I can, so, every possible font
rendering setting I found is set so it shouldn't use AA. This is KDE
on Debian squeeze 64 bit. The default font used everywhere is Arial.

What I see when Emacs starts (and stops on the fault) - the display
area isn't fully initialized, the screen and the scrollbars aren't
drawn completely (scrollbars show blanks). The mouse pointer changes
shape to a bitmap image of an arrow (similar to the one used on Macs,
i.e. black arrow with white contour) while hovering over the menu
strip. The mouse pointer disappears when hovering over the text area.
The menu in Emacs doesn't use the system default font at the time it
crashes (it uses something that looks like narrow-ish Helvetica, but
cannot tell for sure, but it uses some sort of vector rendering, it's
not a bitmap font.)

I'll happily provide any additional info.

Best.

Oleg




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Fri, 29 Jun 2012 06:39:02 GMT) Full text and rfc822 format available.

Message #8 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Left Right <olegsivokon <at> gmail.com>
Cc: 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: Segmentation fault on launch related
	to	x_draw_glyph_string_background
Date: Fri, 29 Jun 2012 09:33:11 +0300
> Date: Fri, 29 Jun 2012 05:25:26 +0300
> From: Left Right <olegsivokon <at> gmail.com>
> 
> Program received signal SIGSEGV, Segmentation fault.
> x_draw_glyph_string_background (s=0x7fffffffcb60, force_p=1) at xterm.c:1210
> 1210          else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width

Is the reason for SIGSEGV that s->font is a NULL pointer?  If not,
what is the reason?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Fri, 29 Jun 2012 09:08:01 GMT) Full text and rfc822 format available.

Message #11 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Left Right <olegsivokon <at> gmail.com>
Cc: 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: Segmentation fault on launch related to
	x_draw_glyph_string_background
Date: Fri, 29 Jun 2012 12:02:46 +0300
[Please keep the bug address on the CC list, so that this discussion
is archived with the bug report.]

> Date: Fri, 29 Jun 2012 10:22:20 +0300
> From: Left Right <olegsivokon <at> gmail.com>
> 
> Program received signal SIGSEGV, Segmentation fault.
> x_draw_glyph_string_background (s=0x7fffffffcb60, force_p=1) 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->height
> $2 = 25
> (gdb) print box_line_width
> $3 = 0
> (gdb) print *s->font
> Cannot access memory at address 0x0
> (gdb) print s
> $4 = (struct glyph_string *) 0x7fffffffcb60
> (gdb) print *s
> $5 = {
>   x = 82,
>   y = 631,
>   ybase = 649,
>   width = 288,
>   background_width = 288,
>   height = 25,
>   left_overhang = 0,
>   right_overhang = 0,
>   f = 0x1147010,
>   w = 0x1148020,
>   display = 0x12f5b70,
>   window = 46137470,
>   row = 0xbccc50,
>   area = TEXT_AREA,
>   char2b = 0x0,
>   nchars = 12,
>   hl = DRAW_NORMAL_TEXT,
>   face = 0x1312850,
>   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 = 0x12e1660,
>   first_glyph = 0xbf60b0,
>   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 = 0x7fffffffca60,
>   prev = 0x7fffffffcd00
> }
> 
> Hi, yes, it looks like it. Sorry, I'm neither very familiar with the
> code nor with gdb. The above is what I could get, but if it's not
> enough, please tell where to look.

Please type "bt full" at the GDB prompt when Emacs crashes, and post
here the results.  (If you type "set logging on" before that, GDB will
output everything to a file named gdb.txt in the directory where you
run it, so you won't need to copy from the screen.)

Also, if you built Emacs with optimizations, please reconfigure and
rebuild like this:

  CFLAGS='-O0 -ggdb -g3' ./configure --enable-checking --enable-asserts ...
  make

(where "..." stands for any other options you use with configure).
This is because backtraces from optimized builds are deceptive and
make debugging hard.  If you do make a new build without
optimizations, please make sure it crashes like the optimized one.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Fri, 29 Jun 2012 09:45:02 GMT) Full text and rfc822 format available.

Message #14 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Left Right <olegsivokon <at> gmail.com>
To: 11813 <at> debbugs.gnu.org
Subject: Fwd: bug#11813: Segmentation fault on launch related to
	x_draw_glyph_string_background
Date: Fri, 29 Jun 2012 12:40:16 +0300
[Message part 1 (text/plain, inline)]
Sorry, I replied to Eli Zaretskii forgetting to CC the list.

---------- Forwarded message ----------
From: Left Right <olegsivokon <at> gmail.com>
Date: Fri, Jun 29, 2012 at 12:30 PM
Subject: Re: bug#11813: Segmentation fault on launch related to
x_draw_glyph_string_background
To: Eli Zaretskii <eliz <at> gnu.org>


I've reset the flags to no optimization and recompiled, and I see the
same error. Below is the full log, I'll paste it here in case the list
doesn't accept attachments, sorry if it will come out crooked.

Starting program: /home/wvxvw/projects/emacs-sources/emacs/src/emacs -q
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x000000000056c02e in x_draw_glyph_string_background
(s=0x7fffffffba40, force_p=1) at xterm.c:1210
1210          else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
#0  0x000000000056c02e in x_draw_glyph_string_background
(s=0x7fffffffba40, force_p=1) at xterm.c:1210
       box_line_width = 0
#1  0x0000000000571508 in x_draw_glyph_string (s=0x7fffffffba40) at xterm.c:2814
       relief_drawn_p = 0
#2  0x0000000000493044 in draw_glyphs (w=0x146bdc0, x=850,
row=0x16748e0, area=TEXT_AREA, start=0, end=68, hl=DRAW_NORMAL_TEXT,
overlaps=0) at xdisp.c:23404
       head = 0x7fffffffbbe0
       tail = 0x7fffffffb940
       s = 0x7fffffffba40
       clip_head = 0x0
       clip_tail = 0x0
       i = 68
       j = 32
       x_reached = 850
       last_x = 841
       area_left = 1
       f = 0x146adb0
#3  0x000000000049a056 in x_write_glyphs (start=0xf20600, len=68) at
xdisp.c:25046
       x = 0
       hpos = 0
       chpos = 0
#4  0x0000000000415c2c in update_text_area (w=0x146bdc0, vpos=37) at
dispnew.c:3773
       current_row = 0xf23b90
       desired_row = 0x16748e0
       rif = 0xab19c0
       changed_p = 0
#5  0x000000000041676d in update_window_line (w=0x146bdc0, vpos=37,
mouse_face_overwritten_p=0x7fffffffc16c) at dispnew.c:4014
       current_row = 0xf23b90
       desired_row = 0x16748e0
       rif = 0xab19c0
       changed_p = 0
#6  0x000000000041563e in update_window (w=0x146bdc0, force_p=1) at
dispnew.c:3575
       end = 0x16748e0
       mode_line_row = 0x16748e0
       header_line_row = 0x0
       changed_p = 0
       mouse_face_overwritten_p = 0
       row = 0x16723e0
       yb = 612
       n_updated = 0
       desired_matrix = 0x11d6bb0
       paused_p = 15208032
       preempt_count = 9
       rif = 0xab19c0
#7  0x0000000000414cbc in update_window_tree (w=0x146bdc0, force_p=1)
at dispnew.c:3340
       paused_p = 0
#8  0x00000000004149a8 in update_frame (f=0x146adb0, force_p=1,
inhibit_hairy_id_p=1) at dispnew.c:3269
       paused_p = 0
       root_window = 0x146bdc0
#9  0x000000000045f36f in echo_area_display (update_frame_p=1) at xdisp.c:10752
       n = 1
       mini_window = 21417429
       w = 0x146cdd0
       f = 0x146adb0
       window_height_changed_p = 0
       sf = 0x146adb0
#10 0x000000000045ad75 in message3_nolog (m=23714017, nbytes=65,
multibyte=0) at xdisp.c:9628
       mini_window = 21417429
       frame = 21409205
       f = 0x146adb0
       sf = 0x146adb0
#11 0x000000000045a8cc in message3 (m=23714017, nbytes=65,
multibyte=0) at xdisp.c:9565
       gcpro1 = {
         next = 0x7fffffffc430,
         var = 0x6a9c9b,
         nvars = 0
       }
#12 0x0000000000699686 in Fmessage (nargs=2, args=0x7fffffffc4f0) at
editfns.c:3436
       val = 23714017
#13 0x00000000006a8de7 in Ffuncall (nargs=3, args=0x7fffffffc4e8) at eval.c:2802
       fun = 14492773
       original_fun = 15278610
       funcar = 15361794
       numargs = 2
       lisp_numargs = 6827520
       val = 11994129
       backtrace = {
         next = 0x7fffffffc940,
         function = 0x7fffffffc4e8,
         args = 0x7fffffffc4f0,
         nargs = 2,
         debug_on_exit = 0
       }
       internal_args = 0x7fffffffc9d8
       i = 15279986
#14 0x0000000000718bbc in exec_byte_code (bytestr=11994369,
vector=11994557, maxdepth=24, args_template=0, nargs=0,
args=0x7fffffffc9d8) at bytecode.c:784
       count = 4
       op = 2
       vectorp = 0xb705c8
       stack = {
         pc = 0xd9cad0 ")\207",
         byte_string = 11994369,
         byte_string_start = 0xd9ca97 "\305\030\t\206\071",
         constants = 11994557,
         next = 0x7fffffffcac0
       }
       top = 0x7fffffffc4e8
       result = 15527856
#15 0x00000000006a9c9b in funcall_lambda (fun=11994317, nargs=0,
arg_vector=0x7fffffffc9d8) at eval.c:2986
       val = 8589921008
       syms_left = 0
       next = 19143602
       lexenv = 412
       count = 4
       i = 2
       optional = -13792
       rest = 32767
#16 0x00000000006a9529 in Ffuncall (nargs=1, args=0x7fffffffc9d0) at eval.c:2869
       fun = 11994317
       original_fun = 19439986
       funcar = 100000000
       numargs = 0
       lisp_numargs = 23522358
       val = 140737488347888
       backtrace = {
         next = 0x7fffffffcea0,
         function = 0x7fffffffc9d0,
         args = 0x7fffffffc9d8,
         nargs = 0,
         debug_on_exit = 0
       }
       internal_args = 0x7fffffffcf30
       i = 0
#17 0x0000000000718bbc in exec_byte_code (bytestr=11996273,
vector=11997101, maxdepth=88, args_template=1028, nargs=1,
args=0x7fffffffcf38) at bytecode.c:784
       count = 4
       op = 0
       vectorp = 0xb70fb8
       stack = {
         pc = 0xd9c51a "\210\b\203\021",
         byte_string = 11996273,
         byte_string_start = 0xd9c518 "\306 \210\b\203\021",
         constants = 11997101,
         next = 0x7fffffffd000
       }
       top = 0x7fffffffc9d0
       result = 140737488341568
#18 0x00000000006a9c9b in funcall_lambda (fun=11996221, nargs=1,
arg_vector=0x7fffffffcf30) at eval.c:2986
       val = 4310088018
       syms_left = 1028
       next = 15147520
       lexenv = 14970704
       count = 4
       i = 140737488345264
       optional = 22
       rest = 0
#19 0x00000000006a9529 in Ffuncall (nargs=2, args=0x7fffffffcf28) at eval.c:2869
       fun = 11996221
       original_fun = 19437266
       funcar = 15147520
       numargs = 1
       lisp_numargs = 6827520
       val = 19597478
       backtrace = {
         next = 0x7fffffffd3e0,
         function = 0x7fffffffcf28,
         args = 0x7fffffffcf30,
         nargs = 1,
         debug_on_exit = 0
       }
       internal_args = 0x12b0896
       i = 15279746
#20 0x0000000000718bbc in exec_byte_code (bytestr=11955625,
vector=11957277, maxdepth=72, args_template=0, nargs=0,
args=0x7fffffffd478) at bytecode.c:784
       count = 4
       op = 1
       vectorp = 0xb67428
       stack = {
         pc = 0xd9f3d7 "\210\016H\203\214\005\201\300",
         byte_string = 11955625,
         byte_string_start = 0xd9ee57 "\306
\020\307\021\n\023\307\024\310\311!\211\307=\204\060",
         constants = 11957277,
         next = 0x7fffffffd4f0
       }
       top = 0x7fffffffcf28
       result = 23097713
#21 0x00000000006a9c9b in funcall_lambda (fun=11955573, nargs=0,
arg_vector=0x7fffffffd478) at eval.c:2986
       val = 140737488345264
       syms_left = 0
       next = 140737488343984
       lexenv = 6786392
       count = 4
       i = 5
       optional = -11112
       rest = 32767
#22 0x00000000006a9529 in Ffuncall (nargs=1, args=0x7fffffffd470) at eval.c:2869
       fun = 11955573
       original_fun = 19238802
       funcar = 15147520
       numargs = 0
       lisp_numargs = 6827520
       val = 15120722
       backtrace = {
         next = 0x7fffffffda40,
         function = 0x7fffffffd470,
         args = 0x7fffffffd478,
         nargs = 0,
         debug_on_exit = 0
       }
       internal_args = 0x1607171
       i = 22203478
#23 0x0000000000718bbc in exec_byte_code (bytestr=11951433,
vector=11951885, maxdepth=32, args_template=0, nargs=0,
args=0x7fffffffd8b0) at bytecode.c:784
       count = 3
       op = 0
       vectorp = 0xb65f18
       stack = {
         pc = 0xd9f934
"\210)\210\351\352\353\"\210\354\321\355\"\211;\203\256",
         byte_string = 11951433,
         byte_string_start = 0xd9f89f "\b\203\b",
         constants = 11951885,
         next = 0x0
       }
       top = 0x7fffffffd470
       result = 140737308851520
#24 0x00000000006a9c9b in funcall_lambda (fun=11951381, nargs=0,
arg_vector=0x7fffffffd8b0) at eval.c:2986
       val = 140737353973760
       syms_left = 0
       next = 140737308427896
       lexenv = 140737293415912
       count = 3
       i = 4294969316
       optional = 33
       rest = 0
#25 0x00000000006a98c5 in apply_lambda (fun=11951381, args=15120722)
at eval.c:2929
       args_left = 15120722
       i = 0
       numargs = 0
       arg_vector = 0x7fffffffd8b0
       gcpro1 = {
         next = 0x0,
         var = 0x15f0778,
         nvars = 0
       }
       gcpro2 = {
         next = 0x100000000,
         var = 0xffffffff,
         nvars = 140737488345680
       }
       gcpro3 = {
         next = 0x7fff00000001,
         var = 0x0,
         nvars = 140733193388033
       }
       tem = 2
       sa_count = 3
       sa_must_free = 0
#26 0x00000000006a7120 in eval_sub (form=15346758) at eval.c:2212
       fun = 11951381
       val = 140737353973760
       original_fun = 19139458
       original_args = 15120722
       funcar = 15120722
       backtrace = {
         next = 0x0,
         function = 0x7fffffffda70,
         args = 0x7fffffffd8b0,
         nargs = 0,
         debug_on_exit = 0
       }
       gcpro1 = {
         next = 0x7fffffffdaa0,
         var = 0x683a75,
         nvars = 2822930839
       }
       gcpro2 = {
         next = 0x7ffff7fd66e0,
         var = 0x7fffffffda90,
         nvars = 276967387
       }
       gcpro3 = {
         next = 0x7ffff4617000,
         var = 0x7fffffffda70,
         nvars = 1
       }
#27 0x00000000006a6270 in Feval (form=15346758, lexical=15120722) at eval.c:2021
       count = 2
#28 0x00000000005cc3bf in top_level_2 () at keyboard.c:1164
No locals.
#29 0x00000000006a446d in internal_condition_case (bfun=0x5cc3a2
<top_level_2>, handlers=15172450, hfun=0x5cbea5 <cmd_error>) at
eval.c:1333
       val = 6079425
       c = {
         tag = 15120722,
         val = 15120722,
         next = 0x7fffffffdd00,
         gcpro = 0x0,
         jmp = {{
             __jmpbuf = {2, -5741430973350281040, 4243568,
140737488347888, 0, 0, -5741430973453041488, 5741431852756107440},
             __mask_was_saved = 0,
             __saved_mask = {
               __val = {4294967295, 0, 1, 11191568, 0, 0, 0, 0,
140737351960338, 1, 0, 1, 140737308399024, 1, 2, 140737488346656}
             }
           }},
         backlist = 0x0,
         handlerlist = 0x0,
         lisp_eval_depth = 0,
         pdlcount = 2,
         poll_suppress_count = 1,
         interrupt_input_blocked = 0,
         byte_stack = 0x0
       }
       h = {
         handler = 15172450,
         var = 15120722,
         chosen_clause = 140737488346080,
         tag = 0x7fffffffdb90,
         next = 0x0
       }
#30 0x00000000005cc3f9 in top_level_1 (ignore=15120722) at keyboard.c:1172
No locals.
#31 0x00000000006a3cfd in internal_catch (tag=15168242, func=0x5cc3c1
<top_level_1>, arg=15120722) at eval.c:1090
       c = {
         tag = 15168242,
         val = 15120722,
         next = 0x0,
         gcpro = 0x0,
         jmp = {{
             __jmpbuf = {2, -5741430973297852240, 4243568,
140737488347888, 0, 0, -5741430973339795280, 5741431850440851632},
             __mask_was_saved = 0,
             __saved_mask = {
               __val = {15120722, 140737488346608, 6830709, 0,
4302523939, 140737311891096, 15120722, 15340368, 140737488346712, 14,
15147520, 14523360, 6827487, 140737488346672,
                 15120722, 4243568}
             }
           }},
         backlist = 0x0,
         handlerlist = 0x0,
         lisp_eval_depth = 0,
         pdlcount = 2,
         poll_suppress_count = 1,
         interrupt_input_blocked = 0,
         byte_stack = 0x0
       }
#32 0x00000000005cc31d in command_loop () at keyboard.c:1127
No locals.
#33 0x00000000005cb6f1 in recursive_edit_1 () at keyboard.c:754
       count = 1
       val = 6077156
#34 0x00000000005cbacc in Frecursive_edit () at keyboard.c:818
       count = 0
       buffer = 15120722
#35 0x00000000005c927c in main (argc=2, argv=0x7fffffffe2f8) at emacs.c:1693
       dummy = 140737354131128
       stack_bottom_variable = 0 '\000'
       do_initial_setlocale = 1
       skip_args = 0
       rlim = {
         rlim_cur = 8720000,
         rlim_max = 18446744073709551615
       }
       no_loadup = 0
       junk = 0x0
       dname_arg = 0x0
       ch_to_dir = 0x3d8f538 <Address 0x3d8f538 out of bounds>

Lisp Backtrace:
"message" (0xffffc4f0)
"display-startup-echo-area-message" (0xffffc9d8)
"command-line-1" (0xffffcf30)
"command-line" (0xffffd478)
"normal-top-level" (0xffffd8b0)
$1 = {
 x = 82,
 y = 631,
 ybase = 649,
 width = 288,
 background_width = 288,
 height = 25,
 left_overhang = 0,
 right_overhang = 0,
 f = 0x146adb0,
 w = 0x146bdc0,
 display = 0x161a6b0,
 window = 52428926,
 row = 0x16748e0,
 area = TEXT_AREA,
 char2b = 0x0,
 nchars = 12,
 hl = DRAW_NORMAL_TEXT,
 face = 0x16549c0,
 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 = 0xf64360,
 first_glyph = 0xf20780,
 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 = 0x7fffffffb940,
 prev = 0x7fffffffbbe0
}
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff548a497 in kill () from /lib/libc.so.6
A debugging session is active.

       Inferior 1 [process 27265] will be killed.

Quit anyway? (y or n)

As an aside, I also tried to compile it with no XFT support, with the
same result. When configuring for this compilation I didn't add any
more options, just the --enable-checking --enable-asserts.

Best.

Oleg
[gdb.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Fri, 29 Jun 2012 09:56:01 GMT) Full text and rfc822 format available.

Message #17 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Left Right <olegsivokon <at> gmail.com>
Cc: 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: Segmentation fault on launch related to
	x_draw_glyph_string_background
Date: Fri, 29 Jun 2012 12:51:20 +0300
Again, PLEASE CC 11813 <at> debbugs.gnu.org on all your messages in this
matter.

> Date: Fri, 29 Jun 2012 12:30:16 +0300
> From: Left Right <olegsivokon <at> gmail.com>
> 
> I've reset the flags to no optimization and recompiled, and I see the
> same error. Below is the full log

Thanks.

> I'll paste it here in case the list doesn't accept attachments

The list does accept attachments.

> Starting program: /home/wvxvw/projects/emacs-sources/emacs/src/emacs -q
> [Thread debugging using libthread_db enabled]
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000000056c02e in x_draw_glyph_string_background
> (s=0x7fffffffba40, force_p=1) at xterm.c:1210
> 1210	      else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
> #0  0x000000000056c02e in x_draw_glyph_string_background
> (s=0x7fffffffba40, force_p=1) at xterm.c:1210
>         box_line_width = 0
> #1  0x0000000000571508 in x_draw_glyph_string (s=0x7fffffffba40) at xterm.c:2814
>         relief_drawn_p = 0
> #2  0x0000000000493044 in draw_glyphs (w=0x146bdc0, x=850,
> row=0x16748e0, area=TEXT_AREA, start=0, end=68, hl=DRAW_NORMAL_TEXT,
> overlaps=0) at xdisp.c:23404
>         head = 0x7fffffffbbe0
>         tail = 0x7fffffffb940
>         s = 0x7fffffffba40
>         clip_head = 0x0
>         clip_tail = 0x0
>         i = 68
>         j = 32
>         x_reached = 850
>         last_x = 841
>         area_left = 1
>         f = 0x146adb0

Please go to the above stack frame:

  (gdb) frame 2

and then display the glyph_row 'row':

  (gdb) pgrow

and post here what it shows.

The 'pgrow' command is defined on src/.gdbinit, so either start GDB
from the src/ directory (so it reads .gdbinit automatically), or type

  (gdb) source /path/to/src/.gdbinit

before invoking the 'pgrow' command.

I leave the rest of the backtrace, to get it recorded by the bug
tracker.  Please always CC 11813 <at> debbugs.gnu.org when you mail
responses about this bug.

> #3  0x000000000049a056 in x_write_glyphs (start=0xf20600, len=68) at
> xdisp.c:25046
>         x = 0
>         hpos = 0
>         chpos = 0
> #4  0x0000000000415c2c in update_text_area (w=0x146bdc0, vpos=37) at
> dispnew.c:3773
>         current_row = 0xf23b90
>         desired_row = 0x16748e0
>         rif = 0xab19c0
>         changed_p = 0
> #5  0x000000000041676d in update_window_line (w=0x146bdc0, vpos=37,
> mouse_face_overwritten_p=0x7fffffffc16c) at dispnew.c:4014
>         current_row = 0xf23b90
>         desired_row = 0x16748e0
>         rif = 0xab19c0
>         changed_p = 0
> #6  0x000000000041563e in update_window (w=0x146bdc0, force_p=1) at
> dispnew.c:3575
>         end = 0x16748e0
>         mode_line_row = 0x16748e0
>         header_line_row = 0x0
>         changed_p = 0
>         mouse_face_overwritten_p = 0
>         row = 0x16723e0
>         yb = 612
>         n_updated = 0
>         desired_matrix = 0x11d6bb0
>         paused_p = 15208032
>         preempt_count = 9
>         rif = 0xab19c0
> #7  0x0000000000414cbc in update_window_tree (w=0x146bdc0, force_p=1)
> at dispnew.c:3340
>         paused_p = 0
> #8  0x00000000004149a8 in update_frame (f=0x146adb0, force_p=1,
> inhibit_hairy_id_p=1) at dispnew.c:3269
>         paused_p = 0
>         root_window = 0x146bdc0
> #9  0x000000000045f36f in echo_area_display (update_frame_p=1) at xdisp.c:10752
>         n = 1
>         mini_window = 21417429
>         w = 0x146cdd0
>         f = 0x146adb0
>         window_height_changed_p = 0
>         sf = 0x146adb0
> #10 0x000000000045ad75 in message3_nolog (m=23714017, nbytes=65,
> multibyte=0) at xdisp.c:9628
>         mini_window = 21417429
>         frame = 21409205
>         f = 0x146adb0
>         sf = 0x146adb0
> #11 0x000000000045a8cc in message3 (m=23714017, nbytes=65,
> multibyte=0) at xdisp.c:9565
>         gcpro1 = {
>           next = 0x7fffffffc430,
>           var = 0x6a9c9b,
>           nvars = 0
>         }
> #12 0x0000000000699686 in Fmessage (nargs=2, args=0x7fffffffc4f0) at
> editfns.c:3436
>         val = 23714017
> #13 0x00000000006a8de7 in Ffuncall (nargs=3, args=0x7fffffffc4e8) at eval.c:2802
>         fun = 14492773
>         original_fun = 15278610
>         funcar = 15361794
>         numargs = 2
>         lisp_numargs = 6827520
>         val = 11994129
>         backtrace = {
>           next = 0x7fffffffc940,
>           function = 0x7fffffffc4e8,
>           args = 0x7fffffffc4f0,
>           nargs = 2,
>           debug_on_exit = 0
>         }
>         internal_args = 0x7fffffffc9d8
>         i = 15279986
> #14 0x0000000000718bbc in exec_byte_code (bytestr=11994369,
> vector=11994557, maxdepth=24, args_template=0, nargs=0,
> args=0x7fffffffc9d8) at bytecode.c:784
>         count = 4
>         op = 2
>         vectorp = 0xb705c8
>         stack = {
>           pc = 0xd9cad0 ")\207",
>           byte_string = 11994369,
>           byte_string_start = 0xd9ca97 "\305\030\t\206\071",
>           constants = 11994557,
>           next = 0x7fffffffcac0
>         }
>         top = 0x7fffffffc4e8
>         result = 15527856
> #15 0x00000000006a9c9b in funcall_lambda (fun=11994317, nargs=0,
> arg_vector=0x7fffffffc9d8) at eval.c:2986
>         val = 8589921008
>         syms_left = 0
>         next = 19143602
>         lexenv = 412
>         count = 4
>         i = 2
>         optional = -13792
>         rest = 32767
> #16 0x00000000006a9529 in Ffuncall (nargs=1, args=0x7fffffffc9d0) at eval.c:2869
>         fun = 11994317
>         original_fun = 19439986
>         funcar = 100000000
>         numargs = 0
>         lisp_numargs = 23522358
>         val = 140737488347888
>         backtrace = {
>           next = 0x7fffffffcea0,
>           function = 0x7fffffffc9d0,
>           args = 0x7fffffffc9d8,
>           nargs = 0,
>           debug_on_exit = 0
>         }
>         internal_args = 0x7fffffffcf30
>         i = 0
> #17 0x0000000000718bbc in exec_byte_code (bytestr=11996273,
> vector=11997101, maxdepth=88, args_template=1028, nargs=1,
> args=0x7fffffffcf38) at bytecode.c:784
>         count = 4
>         op = 0
>         vectorp = 0xb70fb8
>         stack = {
>           pc = 0xd9c51a "\210\b\203\021",
>           byte_string = 11996273,
>           byte_string_start = 0xd9c518 "\306 \210\b\203\021",
>           constants = 11997101,
>           next = 0x7fffffffd000
>         }
>         top = 0x7fffffffc9d0
>         result = 140737488341568
> #18 0x00000000006a9c9b in funcall_lambda (fun=11996221, nargs=1,
> arg_vector=0x7fffffffcf30) at eval.c:2986
>         val = 4310088018
>         syms_left = 1028
>         next = 15147520
>         lexenv = 14970704
>         count = 4
>         i = 140737488345264
>         optional = 22
>         rest = 0
> #19 0x00000000006a9529 in Ffuncall (nargs=2, args=0x7fffffffcf28) at eval.c:2869
>         fun = 11996221
>         original_fun = 19437266
>         funcar = 15147520
>         numargs = 1
>         lisp_numargs = 6827520
>         val = 19597478
>         backtrace = {
>           next = 0x7fffffffd3e0,
>           function = 0x7fffffffcf28,
>           args = 0x7fffffffcf30,
>           nargs = 1,
>           debug_on_exit = 0
>         }
>         internal_args = 0x12b0896
>         i = 15279746
> #20 0x0000000000718bbc in exec_byte_code (bytestr=11955625,
> vector=11957277, maxdepth=72, args_template=0, nargs=0,
> args=0x7fffffffd478) at bytecode.c:784
>         count = 4
>         op = 1
>         vectorp = 0xb67428
>         stack = {
>           pc = 0xd9f3d7 "\210\016H\203\214\005\201\300",
>           byte_string = 11955625,
>           byte_string_start = 0xd9ee57 "\306
> \020\307\021\n\023\307\024\310\311!\211\307=\204\060",
>           constants = 11957277,
>           next = 0x7fffffffd4f0
>         }
>         top = 0x7fffffffcf28
>         result = 23097713
> #21 0x00000000006a9c9b in funcall_lambda (fun=11955573, nargs=0,
> arg_vector=0x7fffffffd478) at eval.c:2986
>         val = 140737488345264
>         syms_left = 0
>         next = 140737488343984
>         lexenv = 6786392
>         count = 4
>         i = 5
>         optional = -11112
>         rest = 32767
> #22 0x00000000006a9529 in Ffuncall (nargs=1, args=0x7fffffffd470) at eval.c:2869
>         fun = 11955573
>         original_fun = 19238802
>         funcar = 15147520
>         numargs = 0
>         lisp_numargs = 6827520
>         val = 15120722
>         backtrace = {
>           next = 0x7fffffffda40,
>           function = 0x7fffffffd470,
>           args = 0x7fffffffd478,
>           nargs = 0,
>           debug_on_exit = 0
>         }
>         internal_args = 0x1607171
>         i = 22203478
> #23 0x0000000000718bbc in exec_byte_code (bytestr=11951433,
> vector=11951885, maxdepth=32, args_template=0, nargs=0,
> args=0x7fffffffd8b0) at bytecode.c:784
>         count = 3
>         op = 0
>         vectorp = 0xb65f18
>         stack = {
>           pc = 0xd9f934
> "\210)\210\351\352\353\"\210\354\321\355\"\211;\203\256",
>           byte_string = 11951433,
>           byte_string_start = 0xd9f89f "\b\203\b",
>           constants = 11951885,
>           next = 0x0
>         }
>         top = 0x7fffffffd470
>         result = 140737308851520
> #24 0x00000000006a9c9b in funcall_lambda (fun=11951381, nargs=0,
> arg_vector=0x7fffffffd8b0) at eval.c:2986
>         val = 140737353973760
>         syms_left = 0
>         next = 140737308427896
>         lexenv = 140737293415912
>         count = 3
>         i = 4294969316
>         optional = 33
>         rest = 0
> #25 0x00000000006a98c5 in apply_lambda (fun=11951381, args=15120722)
> at eval.c:2929
>         args_left = 15120722
>         i = 0
>         numargs = 0
>         arg_vector = 0x7fffffffd8b0
>         gcpro1 = {
>           next = 0x0,
>           var = 0x15f0778,
>           nvars = 0
>         }
>         gcpro2 = {
>           next = 0x100000000,
>           var = 0xffffffff,
>           nvars = 140737488345680
>         }
>         gcpro3 = {
>           next = 0x7fff00000001,
>           var = 0x0,
>           nvars = 140733193388033
>         }
>         tem = 2
>         sa_count = 3
>         sa_must_free = 0
> #26 0x00000000006a7120 in eval_sub (form=15346758) at eval.c:2212
>         fun = 11951381
>         val = 140737353973760
>         original_fun = 19139458
>         original_args = 15120722
>         funcar = 15120722
>         backtrace = {
>           next = 0x0,
>           function = 0x7fffffffda70,
>           args = 0x7fffffffd8b0,
>           nargs = 0,
>           debug_on_exit = 0
>         }
>         gcpro1 = {
>           next = 0x7fffffffdaa0,
>           var = 0x683a75,
>           nvars = 2822930839
>         }
>         gcpro2 = {
>           next = 0x7ffff7fd66e0,
>           var = 0x7fffffffda90,
>           nvars = 276967387
>         }
>         gcpro3 = {
>           next = 0x7ffff4617000,
>           var = 0x7fffffffda70,
>           nvars = 1
>         }
> #27 0x00000000006a6270 in Feval (form=15346758, lexical=15120722) at eval.c:2021
>         count = 2
> #28 0x00000000005cc3bf in top_level_2 () at keyboard.c:1164
> No locals.
> #29 0x00000000006a446d in internal_condition_case (bfun=0x5cc3a2
> <top_level_2>, handlers=15172450, hfun=0x5cbea5 <cmd_error>) at
> eval.c:1333
>         val = 6079425
>         c = {
>           tag = 15120722,
>           val = 15120722,
>           next = 0x7fffffffdd00,
>           gcpro = 0x0,
>           jmp = {{
>               __jmpbuf = {2, -5741430973350281040, 4243568,
> 140737488347888, 0, 0, -5741430973453041488, 5741431852756107440},
>               __mask_was_saved = 0,
>               __saved_mask = {
>                 __val = {4294967295, 0, 1, 11191568, 0, 0, 0, 0,
> 140737351960338, 1, 0, 1, 140737308399024, 1, 2, 140737488346656}
>               }
>             }},
>           backlist = 0x0,
>           handlerlist = 0x0,
>           lisp_eval_depth = 0,
>           pdlcount = 2,
>           poll_suppress_count = 1,
>           interrupt_input_blocked = 0,
>           byte_stack = 0x0
>         }
>         h = {
>           handler = 15172450,
>           var = 15120722,
>           chosen_clause = 140737488346080,
>           tag = 0x7fffffffdb90,
>           next = 0x0
>         }
> #30 0x00000000005cc3f9 in top_level_1 (ignore=15120722) at keyboard.c:1172
> No locals.
> #31 0x00000000006a3cfd in internal_catch (tag=15168242, func=0x5cc3c1
> <top_level_1>, arg=15120722) at eval.c:1090
>         c = {
>           tag = 15168242,
>           val = 15120722,
>           next = 0x0,
>           gcpro = 0x0,
>           jmp = {{
>               __jmpbuf = {2, -5741430973297852240, 4243568,
> 140737488347888, 0, 0, -5741430973339795280, 5741431850440851632},
>               __mask_was_saved = 0,
>               __saved_mask = {
>                 __val = {15120722, 140737488346608, 6830709, 0,
> 4302523939, 140737311891096, 15120722, 15340368, 140737488346712, 14,
> 15147520, 14523360, 6827487, 140737488346672,
>                   15120722, 4243568}
>               }
>             }},
>           backlist = 0x0,
>           handlerlist = 0x0,
>           lisp_eval_depth = 0,
>           pdlcount = 2,
>           poll_suppress_count = 1,
>           interrupt_input_blocked = 0,
>           byte_stack = 0x0
>         }
> #32 0x00000000005cc31d in command_loop () at keyboard.c:1127
> No locals.
> #33 0x00000000005cb6f1 in recursive_edit_1 () at keyboard.c:754
>         count = 1
>         val = 6077156
> #34 0x00000000005cbacc in Frecursive_edit () at keyboard.c:818
>         count = 0
>         buffer = 15120722
> #35 0x00000000005c927c in main (argc=2, argv=0x7fffffffe2f8) at emacs.c:1693
>         dummy = 140737354131128
>         stack_bottom_variable = 0 '\000'
>         do_initial_setlocale = 1
>         skip_args = 0
>         rlim = {
>           rlim_cur = 8720000,
>           rlim_max = 18446744073709551615
>         }
>         no_loadup = 0
>         junk = 0x0
>         dname_arg = 0x0
>         ch_to_dir = 0x3d8f538 <Address 0x3d8f538 out of bounds>
> 
> Lisp Backtrace:
> "message" (0xffffc4f0)
> "display-startup-echo-area-message" (0xffffc9d8)
> "command-line-1" (0xffffcf30)
> "command-line" (0xffffd478)
> "normal-top-level" (0xffffd8b0)
> $1 = {
>   x = 82,
>   y = 631,
>   ybase = 649,
>   width = 288,
>   background_width = 288,
>   height = 25,
>   left_overhang = 0,
>   right_overhang = 0,
>   f = 0x146adb0,
>   w = 0x146bdc0,
>   display = 0x161a6b0,
>   window = 52428926,
>   row = 0x16748e0,
>   area = TEXT_AREA,
>   char2b = 0x0,
>   nchars = 12,
>   hl = DRAW_NORMAL_TEXT,
>   face = 0x16549c0,
>   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 = 0xf64360,
>   first_glyph = 0xf20780,
>   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 = 0x7fffffffb940,
>   prev = 0x7fffffffbbe0
> }
> Continuing.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff548a497 in kill () from /lib/libc.so.6
> A debugging session is active.
> 
> 	Inferior 1 [process 27265] will be killed.
> 
> Quit anyway? (y or n)
> 
> As an aside, I also tried to compile it with no XFT support, with the
> same result. When configuring for this compilation I didn't add any
> more options, just the --enable-checking --enable-asserts.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Fri, 29 Jun 2012 10:23:01 GMT) Full text and rfc822 format available.

Message #20 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Left Right <olegsivokon <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: Segmentation fault on launch related to
	x_draw_glyph_string_background
Date: Fri, 29 Jun 2012 13:17:48 +0300
Program received signal SIGSEGV, Segmentation fault.
0x000000000056c02e in x_draw_glyph_string_background
(s=0x7fffffffba40, force_p=1) at xterm.c:1210
1210          else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
(gdb) frame 2
#2  0x0000000000493044 in draw_glyphs (w=0x146bdc0, x=850,
row=0x1674890, area=TEXT_AREA, start=0, end=68, hl=DRAW_NORMAL_TEXT,
overlaps=0) at xdisp.c:23404
23404       FRAME_RIF (f)->draw_glyph_string (s);
(gdb) pgrow
TEXT: 68 glyphs
  0    0: CHAR[ ] str=eb7881[0] blev=0,btyp=L w=11 a+d=14+4 face=1 [
  1   11: CHAR[U] str=11bef51[1] blev=0,btyp=L w=10 a+d=14+4 face=1
  2   21: CHAR[:] str=169a6c1[0] blev=0,btyp=L w=10 a+d=14+4 face=1
  3   31: CHAR[-] str=11daed1[1] blev=0,btyp=L w=10 a+d=14+4 face=1
  4   41: CHAR[-] str=11daeb1[1] blev=0,btyp=L w=10 a+d=14+4 face=1
  5   51: CHAR[-] str=11dbba1[1] blev=0,btyp=L w=10 a+d=14+4 face=1
  6   61: CHAR[ ] str=b0bf61[0] blev=0,btyp=L w=10 a+d=14+4 face=1
  7   71: CHAR[ ] str=b0bf61[1] blev=0,btyp=L w=10 a+d=14+4 face=1
  8   81: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
  9  105: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
 10  129: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
 11  153: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
 12  177: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
 13  201: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
 14  225: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
 15  249: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
 16  273: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
 17  297: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
 18  321: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
 19  345: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
 20  369: CHAR[ ] str=11c5121[0] blev=0,btyp=L w=10 a+d=14+4 face=1
 21  379: CHAR[ ] str=11c5121[1] blev=0,btyp=L w=10 a+d=14+4 face=1
 22  389: CHAR[ ] str=11c5121[2] blev=0,btyp=L w=10 a+d=14+4 face=1
 23  399: CHAR[A] str=11dd7d1[1] blev=0,btyp=L w=10 a+d=14+4 face=1
 24  409: CHAR[l] str=11dd7d1[1] blev=0,btyp=L w=10 a+d=14+4 face=1
 25  419: CHAR[l] str=11dd7d1[1] blev=0,btyp=L w=10 a+d=14+4 face=1
 26  429: CHAR[ ] str=11ab001[0] blev=0,btyp=L w=10 a+d=14+4 face=1
 27  439: CHAR[L] str=11ab001[1] blev=0,btyp=L w=10 a+d=14+4 face=1
 28  449: CHAR[1] str=11ab001[3] blev=0,btyp=L w=10 a+d=14+4 face=1
 29  459: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 30  469: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 31  479: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 32  489: CHAR[ ] str=11aff91[0] blev=0,btyp=L w=10 a+d=14+4 face=1
 33  499: CHAR[ ] str=11aff91[1] blev=0,btyp=L w=10 a+d=14+4 face=1
 34  509: CHAR[(] str=1196d71[0] blev=0,btyp=L w=10 a+d=14+4 face=1
 35  519: CHAR[L] str=169a621[0] blev=0,btyp=L w=10 a+d=14+4 face=1
 36  529: CHAR[i] str=169a621[1] blev=0,btyp=L w=10 a+d=14+4 face=1
 37  539: CHAR[s] str=169a621[2] blev=0,btyp=L w=10 a+d=14+4 face=1
 38  549: CHAR[p] str=169a621[3] blev=0,btyp=L w=10 a+d=14+4 face=1
 39  559: CHAR[ ] str=169a621[4] blev=0,btyp=L w=10 a+d=14+4 face=1
 40  569: CHAR[I] str=169a621[5] blev=0,btyp=L w=10 a+d=14+4 face=1
 41  579: CHAR[n] str=169a621[6] blev=0,btyp=L w=10 a+d=14+4 face=1
 42  589: CHAR[t] str=169a621[7] blev=0,btyp=L w=10 a+d=14+4 face=1
 43  599: CHAR[e] str=169a621[8] blev=0,btyp=L w=10 a+d=14+4 face=1
 44  609: CHAR[r] str=169a621[9] blev=0,btyp=L w=10 a+d=14+4 face=1
 45  619: CHAR[a] str=169a621[10] blev=0,btyp=L w=10 a+d=14+4 face=1
 46  629: CHAR[c] str=169a621[11] blev=0,btyp=L w=10 a+d=14+4 face=1
 47  639: CHAR[t] str=169a621[12] blev=0,btyp=L w=10 a+d=14+4 face=1
 48  649: CHAR[i] str=169a621[13] blev=0,btyp=L w=10 a+d=14+4 face=1
 49  659: CHAR[o] str=169a621[14] blev=0,btyp=L w=10 a+d=14+4 face=1
 50  669: CHAR[n] str=169a621[15] blev=0,btyp=L w=10 a+d=14+4 face=1
 51  679: CHAR[)] str=1196f51[0] blev=0,btyp=L w=10 a+d=14+4 face=1
 52  689: CHAR[ ] str=1196f91[0] blev=0,btyp=L w=10 a+d=14+4 face=1
 53  699: CHAR[ ] pos=0 blev=0,btyp=L w=10 a+d=14+4 face=1
 54  709: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 55  719: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 56  729: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 57  739: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 58  749: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 59  759: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 60  769: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 61  779: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 62  789: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 63  799: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 64  809: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 65  819: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 66  829: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1
 67  839: CHAR[ ] pos=-1 blev=0,btyp=B w=10 a+d=14+4 face=1 ]

Here's what I get in the pgrow

Next, the contents of row:


(gdb) display row
1: row = (struct glyph_row *) 0x1674890
(gdb) display *row
2: *row = {
  glyphs = {0xf20600, 0xf20600, 0xf21680, 0xf21680},
  used = {0, 68, 0},
  x = 0,
  y = 612,
  pixel_width = 849,
  ascent = 18,
  height = 25,
  phys_ascent = 18,
  phys_height = 25,
  visible_height = 25,
  extra_line_spacing = 0,
  hash = 46368546,
  start = {
    pos = {
      charpos = 0,
      bytepos = 0
    },
    overlay_string_index = 0,
    string_pos = {
      charpos = 0,
      bytepos = 0
    },
    dpvec_index = 0
  },
  end = {
    pos = {
      charpos = 0,
      bytepos = 0
    },
    overlay_string_index = 0,
    string_pos = {
      charpos = 0,
      bytepos = 0
    },
    dpvec_index = 0
  },
  minpos = {
    charpos = 0,
    bytepos = 0
  },
  maxpos = {
    charpos = 0,
    bytepos = 0
  },
  overlay_arrow_bitmap = 0,
  left_user_fringe_bitmap = 0,
  right_user_fringe_bitmap = 0,
  left_fringe_bitmap = 0,
  right_fringe_bitmap = 0,
  left_user_fringe_face_id = 0,
  right_user_fringe_face_id = 0,
  left_fringe_face_id = 0,
  right_fringe_face_id = 0,
  left_fringe_offset = 0,
  right_fringe_offset = 0,
  fringe_bitmap_periodic_p = 0,
  redraw_fringe_bitmaps_p = 0,
  enabled_p = 1,
  truncated_on_left_p = 0,
  truncated_on_right_p = 0,
  continued_p = 0,
  displays_text_p = 0,
  ends_at_zv_p = 0,
  fill_line_p = 0,
  indicate_empty_line_p = 0,
  contains_overlapping_glyphs_p = 0,
  full_width_p = 1,
  mode_line_p = 1,
  overlapped_p = 0,
  ends_in_middle_of_char_p = 0,
  starts_in_middle_of_char_p = 0,
  overlapping_p = 0,
  mouse_face_p = 0,
  ends_in_newline_from_string_p = 0,
  exact_window_width_line_p = 0,
  cursor_in_fringe_p = 0,
  ends_in_ellipsis_p = 0,
  indicate_bob_p = 0,
  indicate_top_line_p = 0,
  indicate_eob_p = 0,
  indicate_bottom_line_p = 0,
  reversed_p = 0,
  continuation_lines_width = 0,
  clip = 0x0
}

Best.

Oleg




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Fri, 29 Jun 2012 10:43:02 GMT) Full text and rfc822 format available.

Message #23 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Left Right <olegsivokon <at> gmail.com>
Cc: 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: Segmentation fault on launch related to
	x_draw_glyph_string_background
Date: Fri, 29 Jun 2012 13:37:39 +0300
> Date: Fri, 29 Jun 2012 13:17:48 +0300
> From: Left Right <olegsivokon <at> gmail.com>
> Cc: 11813 <at> debbugs.gnu.org
> 
> (gdb) pgrow
> TEXT: 68 glyphs
>   0    0: CHAR[ ] str=eb7881[0] blev=0,btyp=L w=11 a+d=14+4 face=1 [
>   1   11: CHAR[U] str=11bef51[1] blev=0,btyp=L w=10 a+d=14+4 face=1
>   2   21: CHAR[:] str=169a6c1[0] blev=0,btyp=L w=10 a+d=14+4 face=1
>   3   31: CHAR[-] str=11daed1[1] blev=0,btyp=L w=10 a+d=14+4 face=1
>   4   41: CHAR[-] str=11daeb1[1] blev=0,btyp=L w=10 a+d=14+4 face=1
>   5   51: CHAR[-] str=11dbba1[1] blev=0,btyp=L w=10 a+d=14+4 face=1
>   6   61: CHAR[ ] str=b0bf61[0] blev=0,btyp=L w=10 a+d=14+4 face=1
>   7   71: CHAR[ ] str=b0bf61[1] blev=0,btyp=L w=10 a+d=14+4 face=1
>   8   81: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
>   9  105: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
>  10  129: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
>  11  153: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
>  12  177: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
>  13  201: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
>  14  225: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
>  15  249: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
>  16  273: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
>  17  297: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
>  18  321: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
>  19  345: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5

This is the mode line (of the "*scratch*" buffer, I presume).  The
GLYPHLESS parts seem to indicate that Emacs has no font to display the
buffer name in bold.  Is that possible, given your configuration of
fonts?

I'll try to find a way to avoid a crash in this case.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Fri, 29 Jun 2012 10:47:01 GMT) Full text and rfc822 format available.

Message #26 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: olegsivokon <at> gmail.com
Cc: 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: Segmentation fault on launch related
	to	x_draw_glyph_string_background
Date: Fri, 29 Jun 2012 13:42:14 +0300
> Date: Fri, 29 Jun 2012 13:37:39 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 11813 <at> debbugs.gnu.org
> 
> > Date: Fri, 29 Jun 2012 13:17:48 +0300
> > From: Left Right <olegsivokon <at> gmail.com>
> > Cc: 11813 <at> debbugs.gnu.org
> > 
> > (gdb) pgrow
> > TEXT: 68 glyphs
> >   0    0: CHAR[ ] str=eb7881[0] blev=0,btyp=L w=11 a+d=14+4 face=1 [
> >   1   11: CHAR[U] str=11bef51[1] blev=0,btyp=L w=10 a+d=14+4 face=1
> >   2   21: CHAR[:] str=169a6c1[0] blev=0,btyp=L w=10 a+d=14+4 face=1
> >   3   31: CHAR[-] str=11daed1[1] blev=0,btyp=L w=10 a+d=14+4 face=1
> >   4   41: CHAR[-] str=11daeb1[1] blev=0,btyp=L w=10 a+d=14+4 face=1
> >   5   51: CHAR[-] str=11dbba1[1] blev=0,btyp=L w=10 a+d=14+4 face=1
> >   6   61: CHAR[ ] str=b0bf61[0] blev=0,btyp=L w=10 a+d=14+4 face=1
> >   7   71: CHAR[ ] str=b0bf61[1] blev=0,btyp=L w=10 a+d=14+4 face=1
> >   8   81: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
> >   9  105: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
> >  10  129: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
> >  11  153: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
> >  12  177: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
> >  13  201: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
> >  14  225: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
> >  15  249: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
> >  16  273: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
> >  17  297: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
> >  18  321: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
> >  19  345: GLYPHLESS[HEX] str=11bf4c1[1] w=24 a+d=18+7 face=13 slice=2,65530,2,5
> 
> This is the mode line (of the "*scratch*" buffer, I presume).

By the way: is this on a TTY or in a GUI session?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Fri, 29 Jun 2012 10:55:01 GMT) Full text and rfc822 format available.

Message #29 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Left Right <olegsivokon <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: Segmentation fault on launch related to
	x_draw_glyph_string_background
Date: Fri, 29 Jun 2012 13:49:55 +0300
> By the way: is this on a TTY or in a GUI session?

This is the GUI session.

> The
> GLYPHLESS parts seem to indicate that Emacs has no font to display the
> buffer name in bold.

It's not impossible, if I knew what font it is looking for I'd know
for sure. I had some problems before with multilingual support and
added fonts on the case by case basis, those I could find. Although
Emacs23 I have from PPA starts fine with the fonts I have. Correct me
if I'm wrong, but Emacs doesn't seem to read fonts.conf from my user
directory - how would I set it to use certain fonts?

Best.

Oleg




Merged 11813 11850. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 03 Jul 2012 17:19:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Tue, 03 Jul 2012 17:37:02 GMT) Full text and rfc822 format available.

Message #34 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Left Right <olegsivokon <at> gmail.com>
Cc: 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: Segmentation fault on launch related to
	x_draw_glyph_string_background
Date: Tue, 03 Jul 2012 20:31:44 +0300
> Date: Fri, 29 Jun 2012 13:49:55 +0300
> From: Left Right <olegsivokon <at> gmail.com>
> Cc: 11813 <at> debbugs.gnu.org
> 
> > By the way: is this on a TTY or in a GUI session?
> 
> This is the GUI session.

That was a stupid question on my part, sorry.

> > The
> > GLYPHLESS parts seem to indicate that Emacs has no font to display the
> > buffer name in bold.
> 
> It's not impossible, if I knew what font it is looking for I'd know
> for sure. I had some problems before with multilingual support and
> added fonts on the case by case basis, those I could find. Although
> Emacs23 I have from PPA starts fine with the fonts I have. Correct me
> if I'm wrong, but Emacs doesn't seem to read fonts.conf from my user
> directory - how would I set it to use certain fonts?

Sorry, I don't know, I don't have experience with GTK and related
environments.

Could you try the patch I just posted and see if it solves the issue
at hand?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Tue, 03 Jul 2012 17:39:01 GMT) Full text and rfc822 format available.

Message #37 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: olegsivokon <at> gmail.com
Cc: 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: Segmentation fault on launch related
	to	x_draw_glyph_string_background
Date: Tue, 03 Jul 2012 20:33:27 +0300
> Date: Tue, 03 Jul 2012 20:31:44 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 11813 <at> debbugs.gnu.org
> 
> Could you try the patch I just posted and see if it solves the issue
> at hand?

The patch is here:

  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11850#16




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Tue, 03 Jul 2012 22:00:02 GMT) Full text and rfc822 format available.

Message #40 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Left Right <olegsivokon <at> gmail.com>,
	"11813 <at> debbugs.gnu.org" <11813 <at> debbugs.gnu.org>
Subject: Re: bug#11813: Segmentation fault on launch related to
	x_draw_glyph_string_background
Date: Tue, 3 Jul 2012 23:54:38 +0200
Hello. 


3 jul 2012 kl. 19:31 skrev Eli Zaretskii <eliz <at> gnu.org>:

>> Date: Fri, 29 Jun 2012 13:49:55 +0300
>> From: Left Right <olegsivokon <at> gmail.com>
>> Cc: 11813 <at> debbugs.gnu.org

>> 
>> It's not impossible, if I knew what font it is looking for I'd know
>> for sure. I had some problems before with multilingual support and
>> added fonts on the case by case basis, those I could find. Although
>> Emacs23 I have from PPA starts fine with the fonts I have. Correct me
>> if I'm wrong, but Emacs doesn't seem to read fonts.conf from my user
>> directory - how would I set it to use certain fonts?
> 
> Sorry, I don't know, I don't have experience with GTK and related
> environments.
> 

The file font.conf is used by fontconfig and not related to Gtk. Fontconfig is used for all aa-fonts on X11.


     Jan D. 



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Wed, 04 Jul 2012 10:31:01 GMT) Full text and rfc822 format available.

Message #43 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Left Right <olegsivokon <at> gmail.com>
To: 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: Segmentation fault on launch related to
	x_draw_glyph_string_background
Date: Wed, 4 Jul 2012 13:25:17 +0300
Hi, sorry for delay.

I've applied the patch, and it looks like the initial problem is
fixed, however, the other problem, which seems related surfaces. Below
is debugger output (I've compiled w/o optimization flags).

gdb ./src/emacs
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/wvxvw/projects/emacs-sources/emacs/src/emacs...done.
(gdb) r -q
Starting program: /home/wvxvw/projects/emacs-sources/emacs/src/emacs -q
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x000000000056d3cb in x_draw_glyphless_glyph_string_foreground
(s=0x7fffffffba40) at xterm.c:1419
1419                  code = s->font->driver->encode_char (s->font, str[j]);
(gdb) p s
$1 = (struct glyph_string *) 0x7fffffffba40
(gdb) p *s
$2 = {x = 82, y = 631, ybase = 649, width = 288, background_width =
288, height = 25, left_overhang = 0, right_overhang = 0, f =
0x146adb0, w = 0x146bdc0, display = 0x161a6b0,
  window = 60817534, row = 0x16748e0, area = TEXT_AREA, char2b =
0x7fffffffb710, nchars = 12, hl = DRAW_NORMAL_TEXT, face = 0x1615dd0,
font = 0x0, cmp = 0x0, cmp_id = 0, cmp_from = 0,
  cmp_to = 0, extends_to_end_of_line_p = 0, background_filled_p = 1,
two_byte_p = 0, font_not_found_p = 0, stippled_p = 0, for_overlaps =
0, padding_p = 0, gc = 0x16a5450,
  first_glyph = 0xf20780, 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 = 0x7fffffffb940, prev = 0x7fffffffbbe0}
(gdb) p s->font
$3 = (struct font *) 0x0
(gdb) c
Continuing.
Fatal error (11)
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5255497 in kill () from /lib/libc.so.6
(gdb) q

If I may suggest, I don't know the code very well, but, could it
assert on whether the font exists or not and print out somehow what
font it is looking for? That might be even better then accounting for
non-existing fonts later on.

One more clarification, this is not GTK, I'm running KDE 4.4.5.
Perhaps, although unlikely, I have to change something in it's fonts
configuration? (not that I know of such, but if you do, you are
welcome to suggest).

Best.

Oleg




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Wed, 04 Jul 2012 16:37:01 GMT) Full text and rfc822 format available.

Message #46 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yotam Medini יותם מדיני
	<yotam.medini <at> gmail.com>, Left Right <olegsivokon <at> gmail.com>
Cc: 11850 <at> debbugs.gnu.org, 11813 <at> debbugs.gnu.org
Subject: Re: bug#11850: crash (null font) running emacs built from git
Date: Wed, 04 Jul 2012 19:32:01 +0300
> Date: Wed, 4 Jul 2012 17:31:38 +0300
> From: Yotam Medini יותם מדיני <yotam.medini <at> gmail.com>
> Cc: 11850 <at> debbugs.gnu.org
> 
> With the patch it still crashes immediately (on my office LinuxMint).
> But in a 'later' place. See following gdb-log:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x080feb2f in x_draw_glyphless_glyph_string_foreground (s=0xbfffd230)
>     at xterm.c:1420
> (gdb) where
> #0  0x080feb2f in x_draw_glyphless_glyph_string_foreground (s=0xbfffd230)
>     at xterm.c:1420

As expected.

Next, please apply the patch below, and tell me whether one of the
assertions I've added catches our villain.  If it does, please show
the backtrace.

=== modified file 'src/xdisp.c'
--- src/xdisp.c	2012-06-29 18:52:54 +0000
+++ src/xdisp.c	2012-07-04 16:26:22 +0000
@@ -22508,6 +22508,7 @@ fill_composite_glyph_string (struct glyp
       s->font_not_found_p = 1;
       s->font = FRAME_FONT (s->f);
     }
+  eassert (s->font);
 
   /* Adjust base line for subscript/superscript text.  */
   s->ybase += s->first_glyph->voffset;
@@ -22535,6 +22536,7 @@ fill_gstring_glyph_string (struct glyph_
   s->face = FACE_FROM_ID (s->f, face_id);
   lgstring = composition_gstring_from_id (s->cmp_id);
   s->font = XFONT_OBJECT (LGSTRING_FONT (lgstring));
+  eassert (s->font);
   glyph++;
   while (glyph < last
 	 && glyph->u.cmp.automatic
@@ -22573,6 +22575,7 @@ fill_glyphless_glyph_string (struct glyp
   voffset = glyph->voffset;
   s->face = FACE_FROM_ID (s->f, face_id);
   s->font = s->face->font;
+  eassert (s->font);
   s->nchars = 1;
   s->width = glyph->pixel_width;
   glyph++;
@@ -22654,6 +22657,7 @@ fill_glyph_string (struct glyph_string *
   s->ybase += voffset;
 
   eassert (s->face && s->face->gc);
+  eassert (s->font);
   return glyph - s->row->glyphs[s->area];
 }
 
@@ -22669,6 +22673,7 @@ fill_image_glyph_string (struct glyph_st
   s->slice = s->first_glyph->slice.img;
   s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id);
   s->font = s->face->font;
+  eassert (s->font);
   s->width = s->first_glyph->pixel_width;
 
   /* Adjust base line for subscript/superscript text.  */
@@ -22696,6 +22701,7 @@ fill_stretch_glyph_string (struct glyph_
   face_id = glyph->face_id;
   s->face = FACE_FROM_ID (s->f, face_id);
   s->font = s->face->font;
+  eassert (s->font);
   s->width = glyph->pixel_width;
   s->nchars = 1;
   voffset = glyph->voffset;






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Wed, 04 Jul 2012 20:55:02 GMT) Full text and rfc822 format available.

Message #49 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: yotam.medini <at> gmail.com, olegsivokon <at> gmail.com
Cc: 11850 <at> debbugs.gnu.org, 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Wed, 04 Jul 2012 23:49:34 +0300
> Date: Wed, 04 Jul 2012 19:32:01 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 11850 <at> debbugs.gnu.org, 11813 <at> debbugs.gnu.org
> 
> Next, please apply the patch below, and tell me whether one of the
> assertions I've added catches our villain.  If it does, please show
> the backtrace.

I forgot to tell: for these asserts to be in effect, you need to rerun
the configure script passing it the --enable-checking switch, then
rebuild (without optimizations).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Thu, 05 Jul 2012 07:40:01 GMT) Full text and rfc822 format available.

Message #52 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Left Right <olegsivokon <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Thu, 5 Jul 2012 10:34:52 +0300
OK, so I hoped to find what font is that, but id 13, although sounds
somewhat lucky... isn't helping much :P

Here's what I'm getting, with the patch applied:

gdb ./src/emacs
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/wvxvw/projects/emacs-sources/emacs/src/emacs...done.
(gdb) r -q
Starting program: /home/wvxvw/projects/emacs-sources/emacs/src/emacs -q
[Thread debugging using libthread_db enabled]

xdisp.c:22578: Emacs fatal error: assertion failed: s->font

Program received signal SIGABRT, Aborted.
0x00007ffff5255497 in kill () from /lib/libc.so.6
(gdb) bt
#0  0x00007ffff5255497 in kill () from /lib/libc.so.6
#1  0x00000000005c757e in abort () at emacs.c:390
#2  0x000000000067f91f in die (msg=0x793db7 "assertion failed:
s->font", file=0x788030 "xdisp.c", line=22578) at alloc.c:6653
#3  0x000000000048eb18 in fill_glyphless_glyph_string
(s=0x7fffffffba40, face_id=13, start=8, end=68, overlaps=0) at
xdisp.c:22578
#4  0x00000000004908c5 in draw_glyphs (w=0x146bdc0, x=82,
row=0x16748e0, area=TEXT_AREA, start=0, end=68, hl=DRAW_NORMAL_TEXT,
overlaps=0) at xdisp.c:23251
#5  0x000000000049a168 in x_write_glyphs (start=0xf20600, len=68) at
xdisp.c:25052
#6  0x0000000000415c3c in update_text_area (w=0x146bdc0, vpos=37) at
dispnew.c:3773
#7  0x000000000041677d in update_window_line (w=0x146bdc0, vpos=37,
mouse_face_overwritten_p=0x7fffffffc16c) at dispnew.c:4014
#8  0x000000000041564e in update_window (w=0x146bdc0, force_p=1) at
dispnew.c:3575
#9  0x0000000000414ccc in update_window_tree (w=0x146bdc0, force_p=1)
at dispnew.c:3340
#10 0x00000000004149b8 in update_frame (f=0x146adb0, force_p=1,
inhibit_hairy_id_p=1) at dispnew.c:3269
#11 0x000000000045f37f in echo_area_display (update_frame_p=1) at xdisp.c:10752
#12 0x000000000045ad85 in message3_nolog (m=23714017, nbytes=65,
multibyte=0) at xdisp.c:9628
#13 0x000000000045a8dc in message3 (m=23714017, nbytes=65,
multibyte=0) at xdisp.c:9565
#14 0x00000000006997aa in Fmessage (nargs=2, args=0x7fffffffc4f0) at
editfns.c:3436
#15 0x00000000006a8f0b in Ffuncall (nargs=3, args=0x7fffffffc4e8) at eval.c:2802
#16 0x0000000000718ce0 in exec_byte_code (bytestr=11994369,
vector=11994557, maxdepth=24, args_template=0, nargs=0,
args=0x7fffffffc9d8) at bytecode.c:784
#17 0x00000000006a9dbf in funcall_lambda (fun=11994317, nargs=0,
arg_vector=0x7fffffffc9d8) at eval.c:2986
#18 0x00000000006a964d in Ffuncall (nargs=1, args=0x7fffffffc9d0) at eval.c:2869
#19 0x0000000000718ce0 in exec_byte_code (bytestr=11996273,
vector=11997101, maxdepth=88, args_template=1028, nargs=1,
args=0x7fffffffcf38) at bytecode.c:784
#20 0x00000000006a9dbf in funcall_lambda (fun=11996221, nargs=1,
arg_vector=0x7fffffffcf30) at eval.c:2986
#21 0x00000000006a964d in Ffuncall (nargs=2, args=0x7fffffffcf28) at eval.c:2869
#22 0x0000000000718ce0 in exec_byte_code (bytestr=11955625,
vector=11957277, maxdepth=72, args_template=0, nargs=0,
args=0x7fffffffd478) at bytecode.c:784
#23 0x00000000006a9dbf in funcall_lambda (fun=11955573, nargs=0,
arg_vector=0x7fffffffd478) at eval.c:2986
#24 0x00000000006a964d in Ffuncall (nargs=1, args=0x7fffffffd470) at eval.c:2869
#25 0x0000000000718ce0 in exec_byte_code (bytestr=11951433,
vector=11951885, maxdepth=32, args_template=0, nargs=0,
args=0x7fffffffd8b0) at bytecode.c:784
#26 0x00000000006a9dbf in funcall_lambda (fun=11951381, nargs=0,
arg_vector=0x7fffffffd8b0) at eval.c:2986
#27 0x00000000006a99e9 in apply_lambda (fun=11951381, args=15120722)
at eval.c:2929
#28 0x00000000006a7244 in eval_sub (form=15346758) at eval.c:2212
#29 0x00000000006a6394 in Feval (form=15346758, lexical=15120722) at eval.c:2021
#30 0x00000000005cc4e3 in top_level_2 () at keyboard.c:1164
#31 0x00000000006a4591 in internal_condition_case (bfun=0x5cc4c6
<top_level_2>, handlers=15172450, hfun=0x5cbfc9 <cmd_error>) at
eval.c:1333
#32 0x00000000005cc51d in top_level_1 (ignore=15120722) at keyboard.c:1172
#33 0x00000000006a3e21 in internal_catch (tag=15168242, func=0x5cc4e5
<top_level_1>, arg=15120722) at eval.c:1090
#34 0x00000000005cc441 in command_loop () at keyboard.c:1127
#35 0x00000000005cb815 in recursive_edit_1 () at keyboard.c:754
#36 0x00000000005cbbf0 in Frecursive_edit () at keyboard.c:818
#37 0x00000000005c93a0 in main (argc=2, argv=0x7fffffffe2f8) at emacs.c:1693
(gdb) frame 2
#2  0x000000000067f91f in die (msg=0x793db7 "assertion failed:
s->font", file=0x788030 "xdisp.c", line=22578) at alloc.c:6653
6653      abort ();
(gdb) info frame
Stack level 2, frame at 0x7fffffffb9e0:
 rip = 0x67f91f in die (alloc.c:6653); saved rip 0x48eb18
 called by frame at 0x7fffffffba30, caller of frame at 0x7fffffffb9a0
 source language c.
 Arglist at 0x7fffffffb9d0, args: msg=0x793db7 "assertion failed:
s->font", file=0x788030 "xdisp.c", line=22578
 Locals at 0x7fffffffb9d0, Previous frame's sp is 0x7fffffffb9e0
 Saved registers:
  rbx at 0x7fffffffb9c8, rbp at 0x7fffffffb9d0, rip at 0x7fffffffb9d8
(gdb) info locals
No locals.
(gdb) info args
msg = 0x793db7 "assertion failed: s->font"
file = 0x788030 "xdisp.c"
line = 22578
(gdb) frame 3
#3  0x000000000048eb18 in fill_glyphless_glyph_string
(s=0x7fffffffba40, face_id=13, start=8, end=68, overlaps=0) at
xdisp.c:22578
22578     eassert (s->font);
(gdb) info args
s = 0x7fffffffba40
face_id = 13
start = 8
end = 68
overlaps = 0
(gdb) p *s
$1 = {x = 82, y = 631, ybase = 649, width = 0, background_width = 0,
height = 25, left_overhang = 0, right_overhang = 0, f = 0x146adb0, w =
0x146bdc0, display = 0x161a6b0,
  window = 54526078, row = 0x16748e0, area = TEXT_AREA, char2b = 0x0,
nchars = 0, hl = DRAW_NORMAL_TEXT, face = 0x1615dd0, 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 = 0x0, first_glyph = 0xf20780, img = 0x0,
  slice = {x = 0, y = 0, width = 0, height = 0}, clip_head = 0x0,
clip_tail = 0x0, clip = {{x = 0, y = 0, width = 0, height = 0}, {x =
0, y = 0, width = 0, height = 0}}, num_clips = 0,
  underline_position = 0, underline_thickness = 0, next = 0x0, prev =
0x7fffffffbbe0}
(gdb) p *s->face
$2 = {id = 13, gc = 0x16a5450, stipple = 0, foreground = 0, background
= 12566463, underline_color = 0, overline_color = 0,
strike_through_color = 0, box_color = 0, font = 0x0,
  fontset = -1, pixmap_w = 0, pixmap_h = 0, box_line_width = -1, box =
FACE_RAISED_BOX, use_box_color_for_shadows_p = 0, underline_type =
FACE_UNDER_LINE, underline_p = 0, overline_p = 0,
  strike_through_p = 0, foreground_defaulted_p = 0,
background_defaulted_p = 0, underline_defaulted_p = 0,
overline_color_defaulted_p = 0, strike_through_color_defaulted_p = 0,
  box_color_defaulted_p = 1, tty_bold_p = 0, tty_italic_p = 0,
tty_underline_p = 0, tty_reverse_p = 0, colors_copied_bitwise_p = 0,
overstrike = 0, lface = {15121298, 15558049, 15558017,
    15149714, 308, 15150002, 15149714, 15120722, 15120722, 11462737,
11852625, 15120722, 15120722, 15120722, 11921654, 21327581, 15120722,
15558273}, hash = 14922703, next = 0x0,
  prev = 0x0, ascii_face = 0x1615dd0, extra = 0x0}
(gdb)

Best.

Oleg




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Thu, 05 Jul 2012 13:23:01 GMT) Full text and rfc822 format available.

Message #55 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Left Right <olegsivokon <at> gmail.com>
Cc: 11850 <at> debbugs.gnu.org, 11813 <at> debbugs.gnu.org, yotam.medini <at> gmail.com
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Thu, 05 Jul 2012 16:17:55 +0300
> Date: Thu, 5 Jul 2012 10:34:52 +0300
> From: Left Right <olegsivokon <at> gmail.com>
> 
> (gdb) frame 3
> #3  0x000000000048eb18 in fill_glyphless_glyph_string
> (s=0x7fffffffba40, face_id=13, start=8, end=68, overlaps=0) at
> xdisp.c:22578
> 22578     eassert (s->font);
> (gdb) info args
> s = 0x7fffffffba40
> face_id = 13
> start = 8
> end = 68
> overlaps = 0
> (gdb) p *s
> $1 = {x = 82, y = 631, ybase = 649, width = 0, background_width = 0,
> height = 25, left_overhang = 0, right_overhang = 0, f = 0x146adb0, w =
> 0x146bdc0, display = 0x161a6b0,
>   window = 54526078, row = 0x16748e0, area = TEXT_AREA, char2b = 0x0,
> nchars = 0, hl = DRAW_NORMAL_TEXT, face = 0x1615dd0, 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 = 0x0, first_glyph = 0xf20780, img = 0x0,
>   slice = {x = 0, y = 0, width = 0, height = 0}, clip_head = 0x0,
> clip_tail = 0x0, clip = {{x = 0, y = 0, width = 0, height = 0}, {x =
> 0, y = 0, width = 0, height = 0}}, num_clips = 0,
>   underline_position = 0, underline_thickness = 0, next = 0x0, prev =
> 0x7fffffffbbe0}
> (gdb) p *s->face
> $2 = {id = 13, gc = 0x16a5450, stipple = 0, foreground = 0, background
> = 12566463, underline_color = 0, overline_color = 0,
> strike_through_color = 0, box_color = 0, font = 0x0,
>   fontset = -1, pixmap_w = 0, pixmap_h = 0, box_line_width = -1, box =
> FACE_RAISED_BOX, use_box_color_for_shadows_p = 0, underline_type =
> FACE_UNDER_LINE, underline_p = 0, overline_p = 0,
>   strike_through_p = 0, foreground_defaulted_p = 0,
> background_defaulted_p = 0, underline_defaulted_p = 0,
> overline_color_defaulted_p = 0, strike_through_color_defaulted_p = 0,
>   box_color_defaulted_p = 1, tty_bold_p = 0, tty_italic_p = 0,
> tty_underline_p = 0, tty_reverse_p = 0, colors_copied_bitwise_p = 0,
> overstrike = 0, lface = {15121298, 15558049, 15558017,
>     15149714, 308, 15150002, 15149714, 15120722, 15120722, 11462737,
> 11852625, 15120722, 15120722, 15120722, 11921654, 21327581, 15120722,
> 15558273}, hash = 14922703, next = 0x0,
>   prev = 0x0, ascii_face = 0x1615dd0, extra = 0x0}
> (gdb)

In this frame (#3 in this case), what do the following GDB commands
print?

 (gdb) p s->f->output_data.x->font
 (gdb) p *(s->f->output_data.x->font)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Thu, 05 Jul 2012 13:39:01 GMT) Full text and rfc822 format available.

Message #58 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Left Right <olegsivokon <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11850 <at> debbugs.gnu.org, 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Thu, 5 Jul 2012 16:33:30 +0300
> (gdb) p s->f->output_data.x->font
> (gdb) p *(s->f->output_data.x->font)

(gdb) frame 3
#3  0x000000000048eb18 in fill_glyphless_glyph_string
(s=0x7fffffffba40, face_id=13, start=8, end=68, overlaps=0) at
xdisp.c:22578
22578     eassert (s->font);
(gdb) p s->f->output_data.x->font
$1 = (struct font *) 0x146efd8
(gdb) p *(s->f->output_data.x->font)
$2 = {header = {size = 4611686018429485074, next = {nbytes = 264,
buffer = 0x108, vector = 0x108}}, props = {15296386, 15541218,
15541266, 15541170, 15362930, 102728, 102532, 102656, 68,
    400, 0, 400, 18785894, 15120722, 15558113, 15558113, 15120722,
15296386}, max_width = 40, pixel_size = 17, height = 18, space_width =
10, average_width = 10, min_width = 10,
  ascent = 14, descent = 4, underline_thickness = 1,
underline_position = 2, vertical_centering = 0, encoding_type = 0
'\000', baseline_offset = 0, relative_compose = 0,
  default_ascent = 0, font_encoder = 0x1000040800001008, driver =
0xdd5f60, encoding_charset = 1, repertory_charset = 1}
(gdb)

Here's the output.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Thu, 05 Jul 2012 17:00:02 GMT) Full text and rfc822 format available.

Message #61 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Left Right <olegsivokon <at> gmail.com>,
	Yotam Medini יותם מדיני
	<yotam.medini <at> gmail.com>
Cc: 11850 <at> debbugs.gnu.org, 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Thu, 05 Jul 2012 19:54:59 +0300
> Date: Thu, 5 Jul 2012 16:33:30 +0300
> From: Left Right <olegsivokon <at> gmail.com>
> Cc: 11850 <at> debbugs.gnu.org, 11813 <at> debbugs.gnu.org
> 
> > (gdb) p s->f->output_data.x->font
> > (gdb) p *(s->f->output_data.x->font)
> 
> (gdb) frame 3
> #3  0x000000000048eb18 in fill_glyphless_glyph_string
> (s=0x7fffffffba40, face_id=13, start=8, end=68, overlaps=0) at
> xdisp.c:22578
> 22578     eassert (s->font);
> (gdb) p s->f->output_data.x->font
> $1 = (struct font *) 0x146efd8
> (gdb) p *(s->f->output_data.x->font)
> $2 = {header = {size = 4611686018429485074, next = {nbytes = 264,
> buffer = 0x108, vector = 0x108}}, props = {15296386, 15541218,
> 15541266, 15541170, 15362930, 102728, 102532, 102656, 68,
>     400, 0, 400, 18785894, 15120722, 15558113, 15558113, 15120722,
> 15296386}, max_width = 40, pixel_size = 17, height = 18, space_width =
> 10, average_width = 10, min_width = 10,
>   ascent = 14, descent = 4, underline_thickness = 1,
> underline_position = 2, vertical_centering = 0, encoding_type = 0
> '\000', baseline_offset = 0, relative_compose = 0,
>   default_ascent = 0, font_encoder = 0x1000040800001008, driver =
> 0xdd5f60, encoding_charset = 1, repertory_charset = 1}
> (gdb)

OK, then does the following patch fix the problem?

--- src/xdisp.c	2012-07-05 16:28:34 +0000
+++ src/xdisp.c	2012-07-05 16:51:53 +0000
@@ -22604,7 +22604,7 @@ fill_glyphless_glyph_string (struct glyp
   last = s->row->glyphs[s->area] + end;
   voffset = glyph->voffset;
   s->face = FACE_FROM_ID (s->f, face_id);
-  s->font = s->face->font;
+  s->font = s->face->font ? s->face->font : FRAME_FONT (s->f);
   s->nchars = 1;
   s->width = glyph->pixel_width;
   glyph++;





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Sat, 07 Jul 2012 22:48:02 GMT) Full text and rfc822 format available.

Message #64 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Left Right <olegsivokon <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Sun, 8 Jul 2012 01:42:12 +0300
[Message part 1 (text/plain, inline)]
The error seems to be fixed, in a way... :) Emacs started without an
error, however the font it is using... what is it? I don't remember
having or installing it :) And yes, it looks like this particular
typeface simply doesn't have bold variant. I've attached a screenshot
of how it looks.

Best.

Oleg
[emac-missing-font.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Sat, 07 Jul 2012 23:04:02 GMT) Full text and rfc822 format available.

Message #67 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Left Right <olegsivokon <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Sun, 8 Jul 2012 01:58:49 +0300
Ah, sorry, forgot to mention it: there is a setting in menu called
"default font", trying some of the variants listed there I found two
which can render bold face (9x15 and 10x20), few more would print a
message saying that the font is not available:

set-face-attribute: Font not available: #<font-spec nil b&h
lucidatypewriter sans iso8859-1 medium r normal 12.0 nil nil nil
((:name . "-b&h-lucidatypewriter-medium-r-normal-sans-*-120-*-*-*-*-iso8859-1")
(user-spec . "-b&h-lucidatypewriter-medium-r-normal-sans-*-120-*-*-*-*-iso8859-1"))>

And the rest would display something similar to the image I attached
to the previous message, i.e. bold characters replaced by their codes.

Best.

Oleg




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Sun, 08 Jul 2012 03:06:01 GMT) Full text and rfc822 format available.

Message #70 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Left Right <olegsivokon <at> gmail.com>
Cc: 11850 <at> debbugs.gnu.org, 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Sun, 08 Jul 2012 06:00:05 +0300
> Date: Sun, 8 Jul 2012 01:58:49 +0300
> From: Left Right <olegsivokon <at> gmail.com>
> 
> Ah, sorry, forgot to mention it: there is a setting in menu called
> "default font", trying some of the variants listed there I found two
> which can render bold face (9x15 and 10x20), few more would print a
> message saying that the font is not available:
> 
> set-face-attribute: Font not available: #<font-spec nil b&h
> lucidatypewriter sans iso8859-1 medium r normal 12.0 nil nil nil
> ((:name . "-b&h-lucidatypewriter-medium-r-normal-sans-*-120-*-*-*-*-iso8859-1")
> (user-spec . "-b&h-lucidatypewriter-medium-r-normal-sans-*-120-*-*-*-*-iso8859-1"))>
> 
> And the rest would display something similar to the image I attached
> to the previous message, i.e. bold characters replaced by their codes.

Thanks.  I hope some font expert could look into this.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Sun, 08 Jul 2012 14:26:02 GMT) Full text and rfc822 format available.

Message #73 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Left Right <olegsivokon <at> gmail.com>, 11850 <at> debbugs.gnu.org,
	Yotam Medini יותם מדיני
	<yotam.medini <at> gmail.com>, 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Sun, 08 Jul 2012 22:20:01 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> OK, then does the following patch fix the problem?
>
> --- src/xdisp.c	2012-07-05 16:28:34 +0000
> +++ src/xdisp.c	2012-07-05 16:51:53 +0000
> @@ -22604,7 +22604,7 @@ fill_glyphless_glyph_string (struct glyp
>    last = s->row->glyphs[s->area] + end;
>    voffset = glyph->voffset;
>    s->face = FACE_FROM_ID (s->f, face_id);
> -  s->font = s->face->font;
> +  s->font = s->face->font ? s->face->font : FRAME_FONT (s->f);
>    s->nchars = 1;
>    s->width = glyph->pixel_width;
>    glyph++;

This patch is correct, please commit it.  Indeed, when creating
glyphless glyphs, we cannot assume that the face has a well-defined
font, because of the case where font loading during face realization
fails.

I'm not sure why font loading fails in the reporter's specific case, but
it's very likely a system misconfiguration.  One way to induce this bug
is to delete a font file, or change its permissions so that it becomes
unreadable.  When you do this, the fontconfig cache will tell Emacs that
the font exists, but then Emacs fails to load the font when it tries,
triggering this bug.

The reporter should try running `fc-cache -fs' and see if the problem
goes away.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Sun, 08 Jul 2012 16:03:01 GMT) Full text and rfc822 format available.

Message #76 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Chong Yidong <cyd <at> gnu.org>
Cc: olegsivokon <at> gmail.com, 11850 <at> debbugs.gnu.org, yotam.medini <at> gmail.com,
	11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Sun, 08 Jul 2012 18:56:42 +0300
> From: Chong Yidong <cyd <at> gnu.org>
> Cc: Left Right <olegsivokon <at> gmail.com>,  Yotam Medini יותם מדיני <yotam.medini <at> gmail.com>,
>   11850 <at> debbugs.gnu.org,  11813 <at> debbugs.gnu.org
> Date: Sun, 08 Jul 2012 22:20:01 +0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > OK, then does the following patch fix the problem?
> >
> > --- src/xdisp.c	2012-07-05 16:28:34 +0000
> > +++ src/xdisp.c	2012-07-05 16:51:53 +0000
> > @@ -22604,7 +22604,7 @@ fill_glyphless_glyph_string (struct glyp
> >    last = s->row->glyphs[s->area] + end;
> >    voffset = glyph->voffset;
> >    s->face = FACE_FROM_ID (s->f, face_id);
> > -  s->font = s->face->font;
> > +  s->font = s->face->font ? s->face->font : FRAME_FONT (s->f);
> >    s->nchars = 1;
> >    s->width = glyph->pixel_width;
> >    glyph++;
> 
> This patch is correct, please commit it.

Done in revision 108954 on the trunk.

> I'm not sure why font loading fails in the reporter's specific case, but
> it's very likely a system misconfiguration.

I was astonished to see glyphless glyphs on the mode line(!).

I hope some font expert could find the reason for this.  It's not just
a rare misconfiguration, since 2 people reported the same crash.

I'm not closing the bug yet, to allow information about the font
configuration to be collected and maybe additional changes made as
result of that.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Sun, 08 Jul 2012 16:35:02 GMT) Full text and rfc822 format available.

Message #79 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Left Right <olegsivokon <at> gmail.com>
To: Chong Yidong <cyd <at> gnu.org>
Cc: 11850 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
	Yotam Medini יותם מדיני
	<yotam.medini <at> gmail.com>, 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Sun, 8 Jul 2012 19:29:16 +0300
[Message part 1 (text/plain, inline)]
Well, the thing is, it is not "my" font - I have absolutely no idea
what font it is, no other program beside Emacs is trying to use it,
and, of course, I didn't install it myself.

I regenerated the font cache - but that had no effect. Unfortunately
font configuration, at least in the Linuxes I had to work with is
spread over few dozens of files... so, I might be as well missing
something. However, There are few changes to configuration that I made
myself, I've posted my fonts.conf before, but it doesn't look like it
may at all be a problem. I'll copy its content yet again for clarity:


<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>none</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hintstyle">
   <const>hintmedium</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>false</bool>
  </edit>
 </match>
 <dir>~/.fonts</dir>
</fontconfig>

Below are the "profiles" of different "font groups" in  /etc/fonts/conf.d

  -rw-r--r-- 1 root root  124 Mar 30 21:0900 kde.conf
  lrwxrwxrwx 1 root root   39 Mar 14 03:24 20-fix-globaladvance.conf
-> ../conf.avail/20-fix-globaladvance.conf
  lrwxrwxrwx 1 root root   39 Mar 14 03:24 20-unhint-small-vera.conf
-> ../conf.avail/20-unhint-small-vera.conf
  lrwxrwxrwx 1 root root   39 Mar 14 03:29 30-defoma.conf ->
/var/lib/defoma/fontconfig.d/fonts.conf
  lrwxrwxrwx 1 root root   36 Mar 14 03:24 30-metric-aliases.conf ->
../conf.avail/30-metric-aliases.conf
  lrwxrwxrwx 1 root root   33 Mar 14 03:24 30-urw-aliases.conf ->
../conf.avail/30-urw-aliases.conf
  lrwxrwxrwx 1 root root   30 Mar 14 03:24 40-nonlatin.conf ->
../conf.avail/40-nonlatin.conf
  lrwxrwxrwx 1 root root   27 Mar 14 03:24 45-latin.conf ->
../conf.avail/45-latin.conf
  lrwxrwxrwx 1 root root   31 Mar 14 03:24 49-sansserif.conf ->
../conf.avail/49-sansserif.conf
  lrwxrwxrwx 1 root root   26 Mar 14 03:24 50-user.conf ->
../conf.avail/50-user.conf
  lrwxrwxrwx 1 root root   27 Mar 14 03:24 51-local.conf ->
../conf.avail/51-local.conf
  lrwxrwxrwx 1 root root   27 Mar 14 03:24 60-latin.conf ->
../conf.avail/60-latin.conf
  lrwxrwxrwx 1 root root   35 Mar 14 03:24 65-fonts-persian.conf ->
../conf.avail/65-fonts-persian.conf
  lrwxrwxrwx 1 root root   30 Mar 14 03:24 65-nonlatin.conf ->
../conf.avail/65-nonlatin.conf
  lrwxrwxrwx 1 root root   29 Mar 14 03:24 69-unifont.conf ->
../conf.avail/69-unifont.conf
  lrwxrwxrwx 1 root root   40 Mar 14 03:29 70-no-bitmaps.conf ->
/etc/fonts/conf.avail/70-no-bitmaps.conf
  lrwxrwxrwx 1 root root   31 Mar 14 03:24 80-delicious.conf ->
../conf.avail/80-delicious.conf
  lrwxrwxrwx 1 root root   31 Mar 14 03:24 90-synthetic.conf ->
../conf.avail/90-synthetic.conf

The rest of the files in /etc/fonts/ directory are exactly the same as
they would be on other similar systems - I never modified them.

The date is the date of this system was installed. kde.conf is a bit
older - this is because after installing the defaults I've struggled
for a while with anti-aliasing, but, finally, it seems like I've found
a way to remove it completely. Sorry, most of my life I've been a
graphic artist, with books and fonts being my primary occupation. This
is why I think that computer AA fonts are a mistake (but I don't want
to go into this dispute)...

Anyway, if you have any suggestion about where should I look for the
font (I wouldn't mind fixing the font file itself!) I certainly will.
My problem is, however - I have absolutely no idea why and where does
Emacs find the settings that it is using. If I could suggest... there
is an option to set default font, and it lists some values that cannot
be interpreted as a font name. To be honest, I don't even know what
they mean, at first, I assumed those are the sizes in pixels of the
piece of screen allocated to draw a single glyph in the monospace
font, but that doesn't hold, those are neither em-squares, no height
of the roman majuscule or minuscule characters, nor with accents or
descents nor any other such combination... What I mean is these
"names": Default, fixed, 6x10, 6x12, 6x13, 7x13, 7x14, 8x13, 9x15,
10x20, 11x18, 12x24, clean 5x8, clean 6x8, clean 8x8, clean 8x10,
clean 8x14, clean 8x16, sony 8x16, lucidasanstypewriter-12,
lucidasanstypewriter-bold-14, lucidasanstypewriter-bold-24. I also
don't have Lucida font installed on my system and never had.

One more thing, not sure if it helps clarify anything: Emacs doesn't
use the same fonts as all other KDE applications do when rendering the
menus (it uses some elongated sans-serif font, which, proportionally,
resembles Helvetica, i.e. it is taller then Arial, and because of this
letters stand closer to each other some times hiding pieces of the
next letter. Also, because it uses the same font it uses for regular
text for hints (tips), the text in tips is trimmed from the bottom by
few pixels. Screenshot attached.

By the way, something similar happened to me with Emacs 23 too. It
didn't crash though, but it used some fonts I couldn't identify / find
on my system, but using some color scheme fixed that in a mysterious
way.

Inside attachment:
emacs-23-menu-bar.png - this is how menu bar looks in Emacs 23 on the
same desktop, the rest of KDE applications look just like that too.
emacs-24-menu-bar.png - this is how menu bar looks in Emacs 24.
emacs-missing-font-1.png - the tip (hint) with the font trimmed.

Best.

Oleg
[emac-23-menu-bar.png (image/png, attachment)]
[emac-24-menu-bar.png (image/png, attachment)]
[emac-missing-font-1.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Sun, 08 Jul 2012 18:46:01 GMT) Full text and rfc822 format available.

Message #82 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Left Right <olegsivokon <at> gmail.com>
Cc: 11850 <at> debbugs.gnu.org, Chong Yidong <cyd <at> gnu.org>, 11813 <at> debbugs.gnu.org,
	Yotam Medini יותם מדיני <yotam.medini <at> gmail.com>
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Sun, 8 Jul 2012 20:40:02 +0200
8 jul 2012 kl. 18:29 skrev Left Right:
>  What I mean is these
> "names": Default, fixed, 6x10, 6x12, 6x13, 7x13, 7x14, 8x13, 9x15,
> 10x20, 11x18, 12x24, clean 5x8, clean 6x8, clean 8x8, clean 8x10,
> clean 8x14, clean 8x16, sony 8x16, lucidasanstypewriter-12,
> lucidasanstypewriter-bold-14, lucidasanstypewriter-bold-24. I also
> don't have Lucida font installed on my system and never had.

These fontnames are hardcoded in mouse.el and does not reflect what is actually installed.  Many distributions nowdays does not install the old bitmap fonts by default.

	Jan D.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Mon, 09 Jul 2012 04:27:02 GMT) Full text and rfc822 format available.

Message #85 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Left Right <olegsivokon <at> gmail.com>
Cc: 11850 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
	Yotam Medini יותם מדיני
	<yotam.medini <at> gmail.com>, 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Mon, 09 Jul 2012 12:21:24 +0800
Left Right <olegsivokon <at> gmail.com> writes:

> Well, the thing is, it is not "my" font - I have absolutely no idea
> what font it is, no other program beside Emacs is trying to use it,
> and, of course, I didn't install it myself.

There are quite a lot of details missing from the bug report.  In the
first place, what font is Emacs using?  Type

  M-x describe-face RET default RET

and show the entire output.

Also, are you specifying the font in your Emacs init file (via face
customization), or in .Xresources?  And is Emacs compiled with GSettings
and -lfreetype support (these should be reported in the messages near
the output of ./configure)?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Wed, 11 Jul 2012 17:43:01 GMT) Full text and rfc822 format available.

Message #88 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Left Right <olegsivokon <at> gmail.com>
To: Chong Yidong <cyd <at> gnu.org>
Cc: 11850 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
	Yotam Medini יותם מדיני
	<yotam.medini <at> gmail.com>, 11813 <at> debbugs.gnu.org
Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from
	git
Date: Wed, 11 Jul 2012 20:36:40 +0300
[Message part 1 (text/plain, inline)]
>There are quite a lot of details missing from the bug report.  In the
>first place, what font is Emacs using?  Type

>  M-x describe-face RET default RET

This prints the following:


Face: default (sample) (customize this face)

Documentation:
Basic default face.

Defined in `faces.el'.

        Family: nimbus mono l
       Foundry: urw
         Width: normal
        Height: 129
        Weight: normal
         Slant: normal
    Foreground: #e0dedb
    Background: #201f1f
     Underline: nil
      Overline: nil
Strike-through: nil
           Box: nil
       Inverse: nil
       Stipple: nil
          Font: #<font-object -urw-nimbus mono
l-regular-r-normal--17-123-100-100-p-100-iso8859-1>
       Fontset: -urw-nimbus mono
l-regular-r-normal--17-*-100-100-p-100-fontset-startup
       Inherit: nil

In Emacs 23 (which works well) this looks like:

Face: default (sample) (customize this face)

Documentation:
Basic default face.

        Family: fixed
       Foundry: misc
         Width: normal
        Height: 99
        Weight: normal
         Slant: normal
    Foreground: Grey
    Background: Grey15
     Underline: nil
      Overline: nil
Strike-through: nil
           Box: nil
       Inverse: nil
       Stipple: nil
          Font: #<font-object
-misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-1>
       Fontset: -misc-fixed-medium-r-normal--13-*-75-75-c-80-fontset-auto1
       Inherit: nil


Nimbus is indeed a font installed on my system (screenshot attached).
But it has bold face (you can see it on the screenshot). Though the
font which I was referring to as "not installed myself" is the other
one called "variable-pitch" it is used in the "welcome" buffer. And
below is what describe-face tells me about it:

Face: variable-pitch (sample) (customize this face)

Documentation:
The basic variable-pitch face.

Defined in `faces.el'.

        Family: Sans Serif
       Foundry: unspecified
         Width: unspecified
        Height: unspecified
        Weight: unspecified
         Slant: unspecified
    Foreground: unspecified
    Background: unspecified
     Underline: unspecified
      Overline: unspecified
Strike-through: unspecified
           Box: unspecified
       Inverse: unspecified
       Stipple: unspecified
          Font: unspecified
       Fontset: unspecified
       Inherit: unspecified

In Emacs 23 this looks like:

Face: variable-pitch (sample) (customize this face)

Documentation:
The basic variable-pitch face.

        Family: helv
       Foundry: unspecified
         Width: unspecified
        Height: unspecified
        Weight: unspecified
         Slant: unspecified
    Foreground: unspecified
    Background: unspecified
     Underline: unspecified
      Overline: unspecified
Strike-through: unspecified
           Box: unspecified
       Inverse: unspecified
       Stipple: unspecified
          Font: unspecified
       Fontset: unspecified
       Inherit: unspecified


> Also, are you specifying the font in your Emacs init file (via face
> customization), or in .Xresources?

I started Emacs with -q, suppose that loads it w/o my .emacs settings.
I don't even have a ~/.Xresources, so, I guess, that's not an option
either, or can it somehow look for another Xresources? If yes, then
where?

> And is Emacs compiled with GSettings
> and -lfreetype support (these should be reported in the messages near
> the output of ./configure)?

I've added no special configuration options, below is the output of ./configure:


checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for Minix Amsterdam compiler... no
checking for ar... ar
checking for ranlib... ranlib
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C...
(cached) -std=gnu99
checking for install-info... /usr/bin/install-info
checking for gzip... /bin/gzip
checking for paxctl... no
checking for makeinfo... /usr/bin/makeinfo
checking for -znocombreloc... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for readlinkat... yes
checking for gettimeofday... yes
checking for nanotime... no
checking for lstat... yes
checking for alarm... yes
checking for pselect... yes
checking for pthread_sigmask... no
checking for readlink... yes
checking for tzset... yes
checking for strtoimax... yes
checking for strtoumax... yes
checking for symlink... yes
checking for localtime_r... yes
checking for futimes... yes
checking for futimesat... yes
checking for futimens... yes
checking for utimensat... yes
checking for lutimes... yes
checking whether byte ordering is bigendian... no
checking for inline... inline
checking whether strtold conforms to C99... yes
checking for st_dm_mode in struct stat... no
checking whether strmode is declared... no
checking whether the preprocessor supports include_next... yes
checking whether system header files limit the line length... no
checking for getopt.h... yes
checking for sys/time.h... yes
checking for sys/socket.h... yes
checking for wchar.h... yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/select.h... yes
checking for sys/stat.h... (cached) yes
checking for utime.h... yes
checking for sys/param.h... yes
checking for linux/version.h... yes
checking for sys/systeminfo.h... no
checking for stdio_ext.h... yes
checking for fcntl.h... yes
checking for coff.h... no
checking for pty.h... yes
checking for sys/vlimit.h... yes
checking for sys/resource.h... yes
checking for sys/utsname.h... yes
checking for pwd.h... yes
checking for utmp.h... yes
checking for dirent.h... yes
checking for util.h... no
checking for stdlib.h... (cached) yes
checking for pthread.h... yes
checking for malloc/malloc.h... no
checking for maillock.h... no
checking for sys/un.h... yes
checking for getopt.h... (cached) yes
checking for getopt_long_only... yes
checking whether getopt is POSIX compatible... yes
checking for working GNU getopt function... no
checking whether getenv is declared... yes
checking for C/C++ restrict keyword... __restrict
checking for struct timeval... yes
checking for correct struct timeval.tv_sec member... yes
checking for unsigned long long int... yes
checking for long long int... yes
checking whether stdint.h conforms to C99... yes
checking whether lstat correctly handles trailing slash... yes
checking whether <sys/select.h> is self-contained... yes
checking for sigset_t... yes
checking for pid_t... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for wchar_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for struct tm.tm_gmtoff... yes
checking whether strtoimax is declared... yes
checking whether strtoumax is declared... yes
checking whether stat file-mode macros are broken... no
checking for mode_t... yes
checking for struct timespec in <time.h>... yes
checking whether the utimes function works... yes
checking for struct utimbuf... yes
checking for alloca as a compiler built-in... yes
checking for library containing clock_gettime... -lrt
checking for clock_gettime... yes
checking for clock_settime... yes
checking whether dup2 works... yes
checking for getloadavg... yes
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking whether getloadavg is declared... yes
checking whether gettimeofday clobbers localtime buffer... no
checking for gettimeofday with POSIX signature... almost
checking for working mktime... yes
checking whether signature of pselect conforms to POSIX... yes
checking whether readlink signature is correct... yes
checking whether readlink handles trailing slash correctly... yes
checking for volatile sig_atomic_t... yes
checking for sighandler_t... yes
checking for socklen_t... yes
checking for ssize_t... yes
checking for struct stat.st_atim.tv_nsec... yes
checking whether struct stat.st_atim is of type struct timespec... yes
checking for struct stat.st_birthtimespec.tv_nsec... no
checking for struct stat.st_birthtimensec... no
checking for struct stat.st_birthtim.tv_nsec... no
checking for working stdalign.h... no
checking for va_copy... yes
checking whether NULL can be used in arbitrary expressions... yes
checking whether strtoimax works... yes
checking whether symlink handles trailing slash correctly... yes
checking whether <sys/select.h> is self-contained... (cached) yes
checking for nlink_t... yes
checking whether localtime_r is declared... yes
checking whether localtime_r is compatible with its POSIX signature... yes
checking for pkg-config... /usr/bin/pkg-config
checking machine/soundcard.h usability... no
checking machine/soundcard.h presence... no
checking for machine/soundcard.h... no
checking sys/soundcard.h usability... yes
checking sys/soundcard.h presence... yes
checking for sys/soundcard.h... yes
checking soundcard.h usability... no
checking soundcard.h presence... no
checking for soundcard.h... no
checking for _oss_ioctl in -lossaudio... no
checking for alsa >= 1.0.0... no
checking if personality LINUX32 can be set... yes
checking for term.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether sys_siglist is declared... no
checking whether __sys_siglist is declared... no
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for speed_t... yes
checking for struct exception... yes
checking for net/if.h... yes
checking for ifaddrs.h... yes
checking for net/if_dl.h... no
checking for struct ifreq.ifr_flags... yes
checking for struct ifreq.ifr_hwaddr... yes
checking for struct ifreq.ifr_netmask... yes
checking for struct ifreq.ifr_broadaddr... yes
checking for struct ifreq.ifr_addr... yes
checking for struct ifreq.ifr_addr.sa_len... no
checking for  __attribute__ ((__aligned__ (expr)))... yes
checking whether we are using GNU Make... yes
checking whether gcc understands -MMD -MF... yes
checking for long file names... yes
checking for X... libraries , headers
checking whether malloc is Doug Lea style... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for dnet_ntoa in -ldnet... no
checking for main in -lXbsd... no
checking for pthread_self in -lpthread... yes
checking for cma_open in -lpthreads... no
checking whether X on GNU/Linux needs -b to link... no
checking for Xkb... yes
checking for XrmSetDatabase... yes
checking for XScreenResourceString... yes
checking for XScreenNumberOfScreen... yes
checking X11 version 6... 6 or newer
checking for librsvg-2.0 >= 2.11.0... no
checking for Wand >= 6.2.8... no
checking for gtk+-2.0 >= 2.10 glib-2.0 >= 2.10... no
checking for dbus-1 >= 1.0... no
checking for gio-2.0 >= 2.26... no
checking for gconf-2.0 >= 2.13... no
checking for lgetfilecon in -lselinux... no
checking for gnutls >= 2.6.6... no
checking for gnutls_certificate_set_verify_function... no
checking for xaw3d... no
checking for libXaw... yes; using Lucid toolkit
checking X11 toolkit version... 6 or newer
checking for XmuConvertStandardSelection in -lXmu... yes
checking for XShapeQueryExtension in -lXext... yes
checking for fontconfig >= 2.2.0... yes CFLAGS=' ' LIBS='-lfontconfig  '
checking for xft >= 0.13.0... no
checking for XRenderQueryExtension in -lXrender... no
checking X11/xpm.h usability... yes
checking X11/xpm.h presence... yes
checking for X11/xpm.h... yes
checking for XpmReadFileToPixmap in -lXpm... yes
checking for XpmReturnAllocPixels preprocessor define... yes
checking jerror.h usability... yes
checking jerror.h presence... yes
checking for jerror.h... yes
checking for jpeg_destroy_compress in -ljpeg... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking libpng/png.h usability... yes
checking libpng/png.h presence... yes
checking for libpng/png.h... yes
checking for png_get_channels in -lpng... yes
checking tiffio.h usability... yes
checking tiffio.h presence... yes
checking for tiffio.h... yes
checking for TIFFGetVersion in -ltiff... yes
checking gif_lib.h usability... yes
checking gif_lib.h presence... yes
checking for gif_lib.h... yes
checking for EGifPutExtensionLast in -lgif... yes
checking gpm.h usability... no
checking gpm.h presence... no
checking for gpm.h... no
checking X11/SM/SMlib.h usability... yes
checking X11/SM/SMlib.h presence... yes
checking for X11/SM/SMlib.h... yes
checking for SmcOpenConnection in -lSM... yes
checking for libxml-2.0 > 2.6.17... no
checking whether netdb declares h_errno... yes
checking for sqrt in -lm... yes
checking for maillock in -lmail... no
checking for maillock in -llockfile... no
checking for liblockfile.so... no
checking for gethostname... yes
checking for rename... yes
checking for closedir... yes
checking for mkdir... yes
checking for rmdir... yes
checking for getrusage... yes
checking for get_current_dir_name... yes
checking for random... yes
checking for lrand48... yes
checking for logb... yes
checking for frexp... yes
checking for fmod... yes
checking for rint... yes
checking for cbrt... yes
checking for setsid... yes
checking for strerror... yes
checking for fpathconf... yes
checking for select... yes
checking for euidaccess... yes
checking for getpagesize... (cached) yes
checking for setlocale... yes
checking for utimes... yes
checking for getrlimit... yes
checking for setrlimit... yes
checking for setpgid... yes
checking for getcwd... yes
checking for getwd... yes
checking for shutdown... yes
checking for getaddrinfo... yes
checking for __fpending... yes
checking for strsignal... yes
checking for setitimer... yes
checking for sendto... yes
checking for recvfrom... yes
checking for getsockname... yes
checking for getpeername... yes
checking for getifaddrs... yes
checking for freeifaddrs... yes
checking for gai_strerror... yes
checking for mkstemp... yes
checking for getline... yes
checking for getdelim... yes
checking for fsync... yes
checking for sync... yes
checking for difftime... yes
checking for posix_memalign... yes
checking for getpwent... yes
checking for endpwent... yes
checking for getgrent... yes
checking for endgrent... yes
checking for touchlock... no
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for cfmakeraw... yes
checking for cfsetspeed... yes
checking for copysign... yes
checking for __executable_start... yes
checking for __builtin_unwind_init... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking whether getpgrp requires zero arguments... yes
checking for grantpt... yes
checking for getpt... yes
checking for library containing tputs... -lncurses
checking for tzset... (cached) yes
checking whether localtime caches TZ... no
checking for socket... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking whether system supports dynamic ptys... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for snprintf... yes
checking for nl_langinfo and CODESET... yes
checking for mbstate_t... yes
checking for C restricted array declarations... yes

Configured for `x86_64-unknown-linux-gnu'.

  Where should the build process find the source code?
/home/wvxvw/projects/emacs-sources/emacs
  What operating system file should Emacs use?            s/gnu-linux.h
  What compiler should emacs be built with?               gcc -std=gnu99 -g -O2
  Should Emacs use the GNU version of malloc?             yes
      (Using Doug Lea's new malloc from the GNU C Library.)
  Should Emacs use a relocating allocator for buffers?    no
  Should Emacs use mmap(2) for buffer allocation?         no
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          LUCID
  Where do we find X Windows header files?                Standard dirs
  Where do we find X Windows libraries?                   Standard dirs
  Does Emacs use -lXaw3d?                                 no
  Does Emacs use -lXpm?                                   yes
  Does Emacs use -ljpeg?                                  yes
  Does Emacs use -ltiff?                                  yes
  Does Emacs use a gif library?                           yes -lgif
  Does Emacs use -lpng?                                   yes
  Does Emacs use -lrsvg-2?                                no
  Does Emacs use imagemagick?                             no
  Does Emacs use -lgpm?                                   no
  Does Emacs use -ldbus?                                  no
  Does Emacs use -lgconf?                                 no
  Does Emacs use GSettings?                               no
  Does Emacs use -lselinux?                               no
  Does Emacs use -lgnutls?                                no
  Does Emacs use -lxml2?                                  no
  Does Emacs use -lfreetype?                              no
  Does Emacs use -lm17n-flt?                              no
  Does Emacs use -lotf?                                   no
  Does Emacs use -lxft?                                   no
  Does Emacs use toolkit scroll bars?                     yes


configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating lib-src/Makefile
config.status: creating oldXMenu/Makefile
config.status: creating doc/emacs/Makefile
config.status: creating doc/misc/Makefile
config.status: creating doc/lispintro/Makefile
config.status: creating doc/lispref/Makefile
config.status: creating src/Makefile
config.status: creating lwlib/Makefile
config.status: creating lisp/Makefile
config.status: creating leim/Makefile
config.status: creating test/automated/Makefile
config.status: creating admin/unidata/Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing mkdirs commands
config.status: executing epaths commands
creating src/epaths.h
[ -r "/home/wvxvw/projects/emacs-sources/emacs/src/config.in" ] || (
cd /home/wvxvw/projects/emacs-sources/emacs && autoheader )
config.status: executing gdbinit commands


To spare you the reading, both GSettings and -lfreetype are "no", but
the configuration script didn't ask me to install libfreetype although
it is installed:

$ whereis libfreetype
libfreetype: /usr/lib/libfreetype.a /usr/lib/libfreetype.so
/usr/lib/libfreetype.la /usr/lib64/libfreetype.a
/usr/lib64/libfreetype.so /usr/lib64/libfreetype.la

I'm not sure what GSettings is, but it sounds like some Gnome thing
(the system where I'm running into problem is KDE).

Best.

Oleg
[nimbus-installed.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Thu, 12 Jul 2012 07:25:02 GMT) Full text and rfc822 format available.

Message #91 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Left Right <olegsivokon <at> gmail.com>
Cc: 11850 <at> debbugs.gnu.org, 11813 <at> debbugs.gnu.org,
	Yotam Medini יותם מדיני
	<yotam.medini <at> gmail.com>
Subject: Re: bug#11850: bug#11813: bug#11850: crash (null font) running emacs
	built from git
Date: Thu, 12 Jul 2012 15:18:33 +0800
Left Right <olegsivokon <at> gmail.com> writes:

> Nimbus is indeed a font installed on my system (screenshot attached).
> But it has bold face (you can see it on the screenshot). Though the
> font which I was referring to as "not installed myself" is the other
> one called "variable-pitch" it is used in the "welcome" buffer.

The Emacs welcome screen uses `variable-pitch' everywhere except for the
text "Control-g", which is the part that does not display properly in
your screenshot.  The rest of the welcome screen, which uses
`variable-pitch', displays fine in the screenshot.  So the problem is
with the `default' face, not `variable-pitch'.

> both GSettings and -lfreetype are "no", but the configuration script
> didn't ask me to install libfreetype although it is installed

OK, now I remember: we used to allow building with Freetype and without
Xft, but in Emacs 24 this was disabled because the non-xft freetype font
driver was poorly tested and slow.  So if you compile without Xft
support, Emacs doesn't use Freetype any more.

But Emacs should work fine without freetype, so that is not the bug.
Nimbus Mono does require Freetype, but if you compile without Xft, Emacs
shouldn't be looking for that font at all.  If you don't specify a font
in .Xresources or your init file, Emacs should try the following default
fonts (in sequence):

-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
-misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso8859-1
-*-*-medium-r-normal-*-*-140-*-*-c-*-iso8859-1
-*-*-medium-r-*-*-*-*-*-*-c-*-iso8859-1
-*-fixed-*-*-*-*-*-140-*-*-c-*-iso8859-1
fixed

I verified this by doing

./configure --with-xft=no
make
./src/emacs -q

Then Emacs displays the welcome screen fine, with

-misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-1

as the font for the `default' face.  (And if I do

M-x set-frame-font RET
-urw-nimbus mono l-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1 RET

Emacs signals an error saying it can't display that font, as expected.)

So I don't understand why your Emacs is trying to load Nimbus Mono.


Here's something to try: could you try making sure there are no X
resources specified, by doing

xrdb -remove

and running `emacs -Q' to eliminate all customizations?  Does the font
problem still show up in that case?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Thu, 16 Aug 2012 03:35:01 GMT) Full text and rfc822 format available.

Message #94 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Left Right <olegsivokon <at> gmail.com>
Cc: 11850 <at> debbugs.gnu.org, 11813 <at> debbugs.gnu.org,
	Yotam Medini יותם מדיני
	<yotam.medini <at> gmail.com>
Subject: Re: bug#11850: bug#11813: bug#11850: crash (null font) running emacs
	built from git
Date: Thu, 16 Aug 2012 11:25:55 +0800
Chong Yidong <cyd <at> gnu.org> writes:

> Nimbus Mono does require Freetype, but if you compile without Xft,
> Emacs shouldn't be looking for that font at all.  I verified this by
> doing
>
> ./configure --with-xft=no
> make
> ./src/emacs -q
>
> Then Emacs displays the welcome screen fine
> Here's something to try: could you try making sure there are no X
> resources specified, by doing
>
> xrdb -remove
>
> and running `emacs -Q' to eliminate all customizations?  Does the font
> problem still show up in that case?

Hi, could you try the steps suggested in this email and let us know the
results?  Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11813; Package emacs. (Thu, 16 Aug 2012 11:01:02 GMT) Full text and rfc822 format available.

Message #97 received at 11813 <at> debbugs.gnu.org (full text, mbox):

From: Left Right <olegsivokon <at> gmail.com>
To: Chong Yidong <cyd <at> gnu.org>
Cc: 11850 <at> debbugs.gnu.org, 11813 <at> debbugs.gnu.org,
	Yotam Medini יותם מדיני
	<yotam.medini <at> gmail.com>
Subject: Re: bug#11850: bug#11813: bug#11850: crash (null font) running emacs
	built from git
Date: Thu, 16 Aug 2012 13:51:19 +0300
[Message part 1 (text/plain, inline)]
On Thu, Aug 16, 2012 at 6:25 AM, Chong Yidong <cyd <at> gnu.org> wrote:
> Chong Yidong <cyd <at> gnu.org> writes:
>
>> Nimbus Mono does require Freetype, but if you compile without Xft,
>> Emacs shouldn't be looking for that font at all.  I verified this by
>> doing
>>
>> ./configure --with-xft=no
>> make
>> ./src/emacs -q
>>
>> Then Emacs displays the welcome screen fine
>> Here's something to try: could you try making sure there are no X
>> resources specified, by doing
>>
>> xrdb -remove
>>
>> and running `emacs -Q' to eliminate all customizations?  Does the font
>> problem still show up in that case?
>
> Hi, could you try the steps suggested in this email and let us know the
> results?  Thanks.

Hi, Chong Yidong,
Sorry, since I've reported the issue, I've made a lot of changes to
the system, on unrelated matter. Now I'm using Gnome on Debian
squeeze/sid (a different desktop environment, different kernel etc.).
I've installed Emacs24 from Debian testing, and it doesn't show the
same behavior as before, however, if I compile on my own, - still the
same problem with fonts.

Using the configuration option you suggested, I was prompted for
missing library - tifflib. I've then installed tifflib5-dev from
Debian. The configuration was successful afterwards.
I attach the screenshot of how the version I compiled looks.

Best.

Oleg
[emacs-bad-fonts.png (image/png, attachment)]

bug closed, send any further explanations to 11813 <at> debbugs.gnu.org and Left Right <olegsivokon <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 17 Feb 2013 03:28:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 17 Mar 2013 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.