Subject: bug#1179: Emacs on Windows hangs displaying unibyte strings

From: "Juanma Barranquero" <[email-masked]>
Date: Fri, 17 Oct 2008 13:48:06 +0200

merge 872 1179
quit

> This bug is perhaps a variant of #872, as it involves several common elements:

Yep, it is the same bug.

So far, the easiest way to reproduce it I've found is:

emacs -q

and then, on *scratch*, evaluate the following:

(progn
  (set-buffer-multibyte nil)
  (setq unibyte-display-via-language-environment t)
  (insert (encode-coding-string "á" 'cp1252)))

When running under gdb, the result is:

 - On non-optimized builds, it hangs.
 - On optimized builds, it crashes with the attached backtrace.

Is anyone able to reproduce it, or am I the only one seeing it?

   Juanma

Program received signal SIGSEGV, Segmentation fault.
0x011f804c in x_draw_glyph_string_background (s=0x82eae0, force_p=1)
at w32term.c:1279
1279            if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
(gdb) bt
#0  0x011f804c in x_draw_glyph_string_background (s=0x82eae0,
force_p=1) at w32term.c:1279
#1  0x011ff540 in x_draw_glyph_string (s=0x82eae0) at w32term.c:2265
#2  0x01056ccd in draw_glyphs (w=0x3bb4c00, x=400, row=0x312c428,
area=TEXT_AREA, start=47, end=49,
    hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:20504
#3  0x0105a309 in x_write_glyphs (start=0x300b5e0, len=2) at xdisp.c:21913
#4  0x0115f6fc in update_window_line (w=0x3bb4c00, vpos=7,
mouse_face_overwritten_p=0x82ef9c) at dispnew.c:4603
#5  0x0115fedc in update_window (w=0x3bb4c00, force_p=0) at dispnew.c:4310
#6  0x01162596 in update_window_tree (w=0x3bb4c00, force_p=0) at dispnew.c:4003
#7  0x01163d7c in update_frame (f=0x2e43200, force_p=0,
inhibit_hairy_id_p=0) at dispnew.c:3930
#8  0x01047a85 in redisplay_internal (preserve_echo_area=<value
optimized out>) at xdisp.c:11843
#9  0x0108b8b9 in read_char (commandflag=1, nmaps=2, maps=0x82fb70,
prev_event=47900673, used_mouse_menu=0x82fc34,
    end_time=0x0) at keyboard.c:2649
#10 0x0108ff0a in read_key_sequence (keybuf=0x82fcd4, bufsize=30,
prompt=47900673, dont_downcase_last=0,
    can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9343
#11 0x01093061 in command_loop_1 () at keyboard.c:1621
#12 0x010191e6 in internal_condition_case (bfun=0x1092dd3
<command_loop_1>, handlers=47964425,
    hfun=0x108a056 <cmd_error>) at eval.c:1511
#13 0x010894fb in command_loop_2 () at keyboard.c:1338
#14 0x01019290 in internal_catch (tag=47960497, func=0x10894d8
<command_loop_2>, arg=47900673) at eval.c:1247
#15 0x01089e9b in command_loop () at keyboard.c:1317
#16 0x0108a1ef in recursive_edit_1 () at keyboard.c:942
#17 0x0108a35a in Frecursive_edit () at keyboard.c:1004
#18 0x01002cdc in main (argc=2, argv=0xa941e0) at emacs.c:1728