Subject: Re: bug#55047: Bug: Abort Dialog upon start

From: Eli Zaretskii <[email-masked]>
Date: Sun, 01 May 2022 15:32:16 +0300

> Date: Sun, 01 May 2022 15:14:54 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> > Starting program: C:\Program Files\Emacs\emacs-28.1\bin\emacs.exe
> > [New Thread 3876.0xff0]
> > [New Thread 3876.0x2538]
> > [New Thread 3876.0x14d0]
> > gdb: Target exception EXCEPTION_BREAKPOINT at 0x7fff7c9a06b0
> > [New Thread 3876.0xe08]
> > [New Thread 3876.0x171c]
> > [New Thread 3876.0x2bac]
> > gdb: Target exception MS_VC_EXCEPTION at 0x7fff7a294f99
> > [New Thread 3876.0x2024]
> > [New Thread 3876.0x8c4]
> > [New Thread 3876.0x24e0]
> > [New Thread 3876.0x2e80]
> > warning: onecore\base\appmodel\runtime\winrt\lib\windows.applicationmodel.package.cpp(1008)\Windows.ApplicationModel.dll!00007FFF724FE5CF: (caller: 00007FFF724EA25C) ReturnHr(1) tid(2bac) 80070002 The system cannot find the file specified.
> > warning: onecore\base\appmodel\runtime\winrt\lib\windows.applicationmodel.package.cpp(512)\Windows.ApplicationModel.dll!00007FFF724FE441: (caller: 00007FFF23B87D43) ReturnHr(2) tid(2bac) 80070002 The system cannot find the file specified.
> 
> As expected.

Wait a minute: didn't you say this is Windows 10?  If so, why are we
emitting MS_VC_EXCEPTION, that is only done on older Windows versions.

And why do we try to set the name of some thread?

Are you running "emacs -Q", or are you running without the -Q switch,
i.e. with all your customizations?  If the latter, could it be that
some of the customizations start Lisp threads?  If you run Emacs like
this:

  gdb "C:\Program Files\Emacs\emacs-28.1\bin\emacs.exe"
  ...
  (gdb) break sys_thread_set_name
  (gdb) run

does the breakpoint in sys_thread_set_name break?  If so, please type

  (gdb) bt

when Emacs is stopped in sys_thread_set_name, and show the result.