emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Crash displaying byte-code


From: Juanma Barranquero
Subject: Crash displaying byte-code
Date: Tue, 5 Aug 2008 13:35:48 +0200

I can consistently reproduce this crash, though it is perhaps a bit
specific to my compiler setup, etc.

emacs -Q
M-x ielm <RET>

then type

(let ((standard-output (current-buffer)))
  (setq unibyte-display-via-language-environment t)
  (set-buffer-multibyte nil)
  (backtrace))

Now, the catches:

 - If Emacs is run from inside GDB, it "hangs" for a while and finally
crashes with the attached backtrace 1.
 - If run from the command-line, after doing the above it crashes
immediately; the DrMingw backtrace is a bit different (backtrace 2).
 - It only happens with an optimized build. <sigh>
 - All the above steps are required, including executing the `let'
from inside IELM. In fact, the crash happens while IELM is trying to
display byte-code("...")

This is on Windows XP (Pro and Home) Spanish Edition, Emacs compiled
with gcc "(GCC) 4.3.0 20080305 (alpha-testing) mingw-20080502",
-DENABLE_CHECKING=1 and -fno-crossjumping.

  Juanma


-------------------------------------------------------------------------
------------------------------ backtrace 1 ------------------------------
-------------------------------------------------------------------------

Program received signal SIGSEGV, Segmentation fault.
0x011f45c7 in x_draw_glyph_string_foreground (s=0x82ea60) at w32term.c:1327
1327            font->driver->draw (s, 0, s->nchars, x, y, 0);
(gdb) bt
#0  0x011f45c7 in x_draw_glyph_string_foreground (s=0x82ea60) at w32term.c:1327
#1  0x011f59d7 in x_draw_glyph_string (s=0x82ea60) at w32term.c:2282
#2  0x01056300 in draw_glyphs (w=0x2f77000, x=208, row=0x2dae688,
area=TEXT_AREA, start=1, end=19,
    hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:20475
#3  0x01059319 in x_write_glyphs (start=0x2e08020, len=18) at xdisp.c:21819
#4  0x0115c449 in update_window_line (w=0x2f77000, vpos=11,
mouse_face_overwritten_p=0x82f0ec) at dispnew.c:4593
#5  0x0115ca7c in update_window (w=0x2f77000, force_p=0) at dispnew.c:4309
#6  0x0115f136 in update_window_tree (w=0x2f77000, force_p=0) at dispnew.c:4002
#7  0x01160924 in update_frame (f=0x2dda800, force_p=0,
inhibit_hairy_id_p=0) at dispnew.c:3930
#8  0x01047481 in redisplay_internal (preserve_echo_area=<value
optimized out>) at xdisp.c:11854
#9  0x0108a5b9 in read_char (commandflag=1, nmaps=2, maps=0x82fb70,
prev_event=47519745, used_mouse_menu=0x82fc34,
    end_time=0x0) at keyboard.c:2652
#10 0x0108ec0a in read_key_sequence (keybuf=0x82fcd4, bufsize=30,
prompt=47519745, dont_downcase_last=0,
    can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9349
#11 0x01091d7d in command_loop_1 () at keyboard.c:1620
#12 0x01019006 in internal_condition_case (bfun=0x1091aef
<command_loop_1>, handlers=47583497,
    hfun=0x1088d56 <cmd_error>) at eval.c:1511
#13 0x0108806b in command_loop_2 () at keyboard.c:1338
#14 0x010190b0 in internal_catch (tag=47579569, func=0x1088048
<command_loop_2>, arg=47519745) at eval.c:1247
#15 0x01088b9b in command_loop () at keyboard.c:1317
#16 0x01088eef in recursive_edit_1 () at keyboard.c:942
#17 0x0108905a in Frecursive_edit () at keyboard.c:1004
#18 0x01002c41 in main (argc=2, argv=0xa841e0) at emacs.c:1688


-------------------------------------------------------------------------
------------------------------ backtrace 2 ------------------------------
-------------------------------------------------------------------------

Call stack:
011EEEB2  emacs.exe:011EEEB2  x_draw_glyph_string_background  w32term.c:1265

        ...
              else
        #endif
>               if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
               || s->font_not_found_p
               || s->extends_to_end_of_line_p
        ...

011F6111  emacs.exe:011F6111  x_draw_glyph_string  w32term.c:2252

        ...
              x_set_glyph_string_clipping (s);
              x_draw_glyph_string_background (s, 1);
>             x_draw_glyph_string_box (s);
              x_set_glyph_string_clipping (s);
              relief_drawn_p = 1;
        ...

01056300  emacs.exe:01056300  draw_glyphs  xdisp.c:20474

        ...
        
          /* Draw all strings.  */
>         for (s = head; s; s = s->next)
            FRAME_RIF (f)->draw_glyph_string (s);
        
        ...

01059319  emacs.exe:01059319  x_write_glyphs  xdisp.c:21819

        ...
        
          hpos = start - updated_row->glyphs[updated_area];
>         x = draw_glyphs (updated_window, output_cursor.x,
           updated_row, updated_area,
           hpos, hpos + len,
        ...

0115C449  emacs.exe:0115C449  update_window_line  dispnew.c:4593

        ...
        {
          rif->cursor_to (vpos, i, desired_row->y, x);
>         rif->write_glyphs (desired_glyph, desired_row->used[TEXT_AREA] - i);
          changed_p = 1;
        }
        ...

0115CA7C  emacs.exe:0115CA7C  update_window  dispnew.c:4309

        ...
              detect_input_pending_ignore_squeezables ();
        #endif
>           changed_p |= update_window_line (w, vpos,
             &mouse_face_overwritten_p);
        
        ...

0115F136  emacs.exe:0115F136  update_window_tree  dispnew.c:4002

        ...
        paused_p |= update_window_tree (XWINDOW (w->vchild), force_p);
              else if (w->must_be_updated_p)
>       paused_p |= update_window (w, force_p);
        
              w = NILP (w->next) ? 0 : XWINDOW (w->next);
        ...

01160924  emacs.exe:01160924  update_frame  dispnew.c:3930

        ...
        
              /* Update windows.  */
>             paused_p = update_window_tree (root_window, force_p);
              update_end (f);
        
        ...

01047481  emacs.exe:01047481  redisplay_internal  xdisp.c:11854

        ...
          /* Update the display.  */
          set_window_update_flags (XWINDOW (f->root_window), 1);
>         pause |= update_frame (f, 0, 0);
        #if 0  /* Exiting the loop can leave the wrong value for buffer_shared. 
 */
          if (pause)
        ...

0108A5B9  emacs.exe:0108A5B9  read_char  keyboard.c:2652

        ...
            redisplay_preserve_echo_area (5);
          else
>           redisplay ();
        
          if (!input_pending)
        ...

0108EC0A  emacs.exe:0108EC0A  read_key_sequence  keyboard.c:9349

        ...
            KBOARD *interrupted_kboard = current_kboard;
            struct frame *interrupted_frame = SELECTED_FRAME ();
>           key = read_char (NILP (prompt), nmaps,
             (Lisp_Object *) submaps, last_nonmenu_event,
             &used_mouse_menu, NULL);
        ...

01091D7D  emacs.exe:01091D7D  command_loop_1  keyboard.c:1620

        ...
        
              /* Read next key sequence; i gets its length.  */
>             i = read_key_sequence (keybuf, sizeof keybuf / sizeof keybuf[0],
             Qnil, 0, 1, 1);
        
        ...

01019006  emacs.exe:01019006  internal_condition_case  eval.c:1511

        ...
          handlerlist = &h;
        
>         val = (*bfun) ();
          catchlist = c.next;
          handlerlist = h.next;
        ...

0108806B  emacs.exe:0108806B  command_loop_2  keyboard.c:1339

        ...
          do
            val = internal_condition_case (command_loop_1, Qerror, cmd_error);
>         while (!NILP (val));
        
          return Qnil;
        ...

010190B0  emacs.exe:010190B0  internal_catch  eval.c:1247

        ...
          /* Call FUNC.  */
          if (! _setjmp (c.jmp))
>           c.val = (*func) (arg);
        
          /* Throw works by a longjmp that comes right here.  */
        ...

01088B9B  emacs.exe:01088B9B  command_loop  keyboard.c:1318

        ...
        #endif
        internal_catch (Qtop_level, command_loop_2, Qnil);
>       executing_kbd_macro = Qnil;
        
        /* End of file in -batch run causes exit here.  */
        ...

01088EEF  emacs.exe:01088EEF  recursive_edit_1  keyboard.c:942

        ...
          redisplaying_p = 0;
        
>         val = command_loop ();
          if (EQ (val, Qt))
            Fsignal (Qquit, Qnil);
        ...

0108905A  emacs.exe:0108905A  Frecursive_edit  keyboard.c:1005

        ...
        
          recursive_edit_1 ();
>         return unbind_to (count, Qnil);
        }
        
        ...

01002C41  emacs.exe:01002C41  main  emacs.c:1691

        ...
          /* NOTREACHED */
          return 0;
>       }
        
        /* Sort the args so we can find the most important ones
        ...

0100124B  emacs.exe:0100124B
01001298  emacs.exe:01001298
7C816FD7  kernel32.dll:7C816FD7  RegisterWaitForInputIdle




reply via email to

[Prev in Thread] Current Thread [Next in Thread]