Subject: Re: bug#12579: Emacs 24.2 crashes or freezes

From: "Fabrice Niessen" <[email-masked]>
Date: Fri, 16 Nov 2012 10:21:06 +0100

Hi Eli,

"Fabrice Niessen" wrote:
> Eli Zaretskii wrote:
>> Can you kill it from Process Explorer (by pressing Del)?  If you can,
>> does Emacs get out of the lockup?
>
> Now, killing es.exe from the Process Explorer *did unblock Emacs*, as you can
> see on
> http://content.screencast.com/users/fniessen/folders/Jing/media/fd8b4e53-5232-451a-9757-7623950365cd/2012-11-14_0938.png:
> I just recovered where I was, in Helm, with the correct files show now -- I
> had previously typed more characters in the pattern, when Emacs just froze...
> Now, they reappeared, with correct results from the "locate" command.
>
> Great news, I guess, in the understanding of what happens...

Did you see this?  Does it tell you something more?

>> Next thing to try is to run es.exe from cmdproxy, not from the Cygwin
>> Bash.
>
> Next thing for me, then, is to try without Bash for shell-file-name:
>
>   (setq shell-file-name "cmdproxy")
>   (setq explicit-shell-file-name "bash")

As said, I'm in this latest configuration for a couple of days, now. I have
not yet had any other "freeze" while using helm's locate feature (es.exe).

... but I just go a real crash now.

Once again, nothing changed, except these 2 lines in my Emacs config file. For
the rest, still my Emacs version of 2012-10-22, same Helm, and, well,
up-to-date Org (version 7.9.2, release_7.9.2-604-ge507ef).

And the crash occurred while clicking on one Org agenda line. Something very
common, though...

--8<---------------cut here---------------start------------->8---
$ gdb -p 8964
GNU gdb (GDB) 7.5.50.20120815-cvs (cygwin-special)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-cygwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 8964
[New Thread 8964.0x16f0]
[New Thread 8964.0x1084]
[New Thread 8964.0x1c78]
[New Thread 8964.0x25b4]
[New Thread 8964.0x1378]
Reading symbols from /cygdrive/c/Program Files/Emacs-24.2/bin/emacs.exe...done.
Warning: /cygdrive/c/Program Files/Emacs-24.2/bin/../lwlib: No such file or directory.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
Environment variable "DISPLAY" not defined.
TERM = xterm-256color
Breakpoint 1 at 0x10013b6: file emacs.c, line 317.
Temporary breakpoint 2 at 0x11441d5: file sysdep.c, line 794.
(gdb) continue
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 8964.0x16f0]
0x7c91120f in ntdll!DbgUiConnectToDbg () from /cygdrive/c/WINDOWS/system32/ntdll.dll
(gdb) thread apply all backtrace

Thread 4 (Thread 8964.0x25b4):
#0  0x7c91e514 in ntdll!LdrAccessResource () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x7c91df5a in ntdll!ZwWaitForSingleObject () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#2  0x7c8025db in WaitForSingleObjectEx () from /cygdrive/c/WINDOWS/system32/kernel32.dll
#3  0x00000564 in ?? ()
#4  0x00000000 in ?? ()

Lisp Backtrace:
"redisplay_internal (C function)" (0x167d33c)

Thread 3 (Thread 8964.0x1c78):
#0  0x7c91e514 in ntdll!LdrAccessResource () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x7c91df5a in ntdll!ZwWaitForSingleObject () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#2  0x7c8025db in WaitForSingleObjectEx () from /cygdrive/c/WINDOWS/system32/kernel32.dll
#3  0x00000660 in ?? ()
#4  0x00000000 in ?? ()

Lisp Backtrace:
"redisplay_internal (C function)" (0x167d33c)

Thread 2 (Thread 8964.0x1084):
#0  0x7c91e514 in ntdll!LdrAccessResource () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x7c91df5a in ntdll!ZwWaitForSingleObject () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#2  0x7c929b23 in ntdll!RtlpWaitForCriticalSection () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#3  0x7c911046 in ntdll!RtlEnumerateGenericTableLikeADirectory () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#4  0x006811a0 in ?? ()
#5  0x01147b48 in my_post_msg (wmsg=0x5b8cfc78, hwnd=0x1ff091e, msg=6, wParam=0, lParam=0) at w32fns.c:1942
#6  0x0114bee0 in w32_wnd_proc (hwnd=0x1ff091e, msg=6, wParam=0, lParam=0) at w32fns.c:3634
#7  0x7e398734 in USER32!GetDC () from /cygdrive/c/WINDOWS/system32/USER32.dll
#8  0x01ff091e in ?? ()
#9  0x7e398816 in USER32!GetDC () from /cygdrive/c/WINDOWS/system32/USER32.dll
#10 0x01148c5a in post_character_message (hwnd=0x6, msg=0, wParam=0, lParam=0, modifiers=33491230) at w32fns.c:2687
#11 0x01ff091e in ?? ()
#12 0x7e3a8ea0 in USER32!DefWindowProcW () from /cygdrive/c/WINDOWS/system32/USER32.dll
#13 0x00000000 in ?? ()

Lisp Backtrace:
"redisplay_internal (C function)" (0x167d33c)

Thread 1 (Thread 8964.0x16f0):
#0  0x7c91120f in ntdll!DbgUiConnectToDbg () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x011546ce in emacs_abort () at w32fns.c:7706
#2  0x0100145d in terminate_due_to_signal (sig=22, backtrace_limit=2147483647) at emacs.c:344
#3  0x010219af in die (msg=0x15cb402 "assertion failed: s->img", file=0x15bf3b0 "xdisp.c", line=22866) at alloc.c:6440
#4  0x01226d67 in fill_image_glyph_string (s=0x82eba0) at xdisp.c:22866
#5  0x01228070 in draw_glyphs (w=0x6d53da0, x=92, row=0x799f350, area=TEXT_AREA, start=0, end=119, hl=DRAW_NORMAL_TEXT, overlaps=0)
---Type <return> to continue, or q <return> to quit---
    at xdisp.c:23444
#6  0x01230ef3 in x_write_glyphs (start=0x7a28000, len=119) at xdisp.c:25340
#7  0x010f54b3 in update_text_area (w=0x6d53da0, vpos=124) at dispnew.c:3718
#8  0x010f5ed6 in update_window_line (w=0x6d53da0, vpos=124, mouse_face_overwritten_p=0x82f107) at dispnew.c:3964
#9  0x010f4f45 in update_window (w=0x6d53da0, force_p=true) at dispnew.c:3520
#10 0x010f4688 in update_window_tree (w=0x6d53da0, force_p=true) at dispnew.c:3286
#11 0x010f45c7 in update_window_tree (w=0x556c358, force_p=true) at dispnew.c:3282
#12 0x010f43aa in update_frame (f=0x3926840 <__register_frame_info+59926592>, force_p=true, inhibit_hairy_id_p=false)
    at dispnew.c:3215
#13 0x0120683b in redisplay_internal () at xdisp.c:13490
#14 0x011fc7ff in resize_echo_area_exactly () at xdisp.c:10270
#15 0x01038e6e in command_loop_1 () at keyboard.c:1605
#16 0x01010e86 in internal_condition_case (bfun=0x10380de <command_loop_1>, handlers=57408946, hfun=0x10378fd <cmd_error>)
    at eval.c:1288
#17 0x01037d57 in command_loop_2 (ignore=57358362) at keyboard.c:1167
#18 0x010108e3 in internal_catch (tag=57398802, func=0x1037d33 <command_loop_2>, arg=57358362) at eval.c:1059
#19 0x01037d11 in command_loop () at keyboard.c:1146
#20 0x010372cb in recursive_edit_1 () at keyboard.c:778
#21 0x010375f8 in Frecursive_edit () at keyboard.c:842
#22 0x01002920 in main (argc=1, argv=0xa44480) at emacs.c:1552

Lisp Backtrace:
"redisplay_internal (C function)" (0x167d33c)
(gdb) xbacktrace
"redisplay_internal (C function)" (0x167d33c)
(gdb) quit
A debugging session is active.

        Inferior 1 [process 8964] will be detached.

Quit anyway? (y or n) y
Detaching from program: /cygdrive/c/Program Files/Emacs-24.2/bin/emacs.exe, Pid 8964
--8<---------------cut here---------------end--------------->8---

Best regards,
Fabrice