Subject: bug#70914: 29.3; Crashes often on Windows

From: Eli Zaretskii <[email-masked]>
Date: Mon, 27 May 2024 16:22:55 +0300

> Date: Mon, 27 May 2024 14:54:22 +0200
> From: Simen Endsjø <[email-masked]>
> Cc: [email-masked]
> 
> I keep getting these errors even though I'm running with the "//" patch. Common
> for the crashes (when attaching gdb to the crashing process) is the following:
> 
>         #6  0x00007ffef66f49ff in ntdll!.chkstk () from C:\WINDOWS\SYSTEM32\ntdll.dll
>         #7  0x00007ffef666e466 in ntdll!RtlFindCharInUnicodeString () from C:\WINDOWS\SYSTEM32\ntdll.dll
> 
> I've been running without org-superstar and org-fancy-priorities. This time I
> got the error when calling `dired-sort-toggle-or-edit`. It's not reproducible in
> that folder after restarting though.
> 
>         Thread 1 (Thread 18588.0x5fd4):
>         #0  0x00007ffef3ecd313 in KERNELBASE!DebugBreak () from C:\WINDOWS\System32\KernelBase.dll
>         #1  0x00007ff78c040f28 in emacs_abort ()
>         #2  0x00007ff78bf0a389 in terminate_due_to_signal ()
>         #3  0x00007ff78bf2b249 in deliver_fatal_thread_signal ()
>         #4  0x00007ff78c0a6672 in _gnu_exception_handler (exception_data=0x377f9fdc00) at
> C:/M/B/src/mingw-w64/mingw-w64-crt/crt/crt_handler.c:213
>         #5  0x00007ffef4b6b248 in msvcrt!__C_specific_handler () from C:\WINDOWS\System32\msvcrt.dll
>         #6  0x00007ffef66f49ff in ntdll!.chkstk () from C:\WINDOWS\SYSTEM32\ntdll.dll
>         #7  0x00007ffef666e466 in ntdll!RtlFindCharInUnicodeString () from C:\WINDOWS\SYSTEM32\ntdll.dll
>         #8  0x00007ffef66f39ee in ntdll!KiUserExceptionDispatcher () from C:\WINDOWS\SYSTEM32\ntdll.dll
>         #9  0x00007ff78bfc3aa3 in print_object ()
>         #10 0x00007ff78bfc55d8 in Fprin1 ()
>         #11 0x00007ff78bfc5d33 in print_error_message ()
>         #12 0x00007ff78bf0c73d in Fcommand_error_default_function ()

It's a different problem.  Here, Emacs wants to print an error
message, but the error data includes some invalid Lisp object, so
print_object crashes.  The error seems to come from
help-command-error-confusable-suggestions.

Can you show the data in print_object (frame 9 in the backtrace you
post)?  Or maybe in frame 12, in Fcommand_error_default_function?  We
need to understand what kind of invalid Lisp data winds up there.

Or maybe you know what you did when Emacs crashed?  What command did
you invoke that wanted to signal this error?