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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 16 May 2024 11:07:30 +0300

> From: Simen Endsjø <[email-masked]>
> Date: Wed, 15 May 2024 22:03:42 +0200
> Cc: [email-masked]
> 
> >>     (process:13240): GLib-GIO-WARNING **: 20:15:06.678: Unexpectedly,
> >> UWP app `Microsoft.OutlookForWindows_1.2023.1101.300_x64__8wekyb3d8bbwe'
> >> (AUMId `Microsoft.OutlookForWindows_8wekyb3d8bbwe!Microsoft.OutlookforWindows')
> >> supports 1 extensions but has no verbs
> >
> > What are these warnings from Glib, and why should Emacs care about
> > problems with Outlook?
> 
> After querying chatgpt a bit, it looks like GIO scans all installed applications
> on the systems, and shows warning for incorrectly specified ones:
> 
>     The warnings you're seeing indicate that certain UWP applications declare
>     extensions (indicating they have certain capabilities) but do not declare
>     any verbs (actions they can perform). This is unusual because typically, an
>     app that supports an extension should also support verbs to interact with
>     those extensions.
> 
> And that these are unrelated to the running process.

Yes, I know all that already.  I just don't understand why we see this
in Emacs from Glib, nor why should Glib make Emacs "scan all the
installed applications" in the first place.  We only use Glib in Emacs
on Windows because it's a dependency of librsvg, so the above sounds
like some gross mis-configuration issue of librsvg as provided by the
MSYS2 folks.  Corwin, any ideas about this? should we raise this issue
with the MSYS2 folks?

> > I again suggest to review all the software installed there, maybe something will
> > stand out.
> 
> There is a lot of processes running on Windows, and I have no idea what most
> is... Here's a list of the running processes. I've removed the command line in
> case there's something sensitive there though.

I didn't mean to look at the processes, I meant to look at the
installed software.  Start Settings, then select System->System
Components, then review the installed Components.  Then click on
"Installed apps" and review the applications you have installed.

You can also do the last part with the "winget list" command from the
command line.

For example, I see indications that you have Power Toys installed.  So
maybe disable them (or uninstall completely, if you can), and see if
that helps.  And maybe if you look at the installed components and
apps, there would be other clues like that.

> Here's a new crash report using cmd.exe. Note that it didn't crash the first
> time, so I `(kill-emacs)` and ran again to get a crash.

Thanks.  This again shows that the program counter got set to zero
somehow.  Why that happens, I don't know.  Perhaps some stack
overwriting, or some software that injects code into the running Emacs
process.

Does this happen in "emacs -Q", or only with your customizations?  If
the latter, perhaps try disabling the customizations one by one or in
related groups, so we could at least have some hint what triggers
these problems if not causes them.

The only other idea I have is to try installing older versions of
Emacs -- if you find one that doesn't crash, maybe we could consider
the changes between it and the first version which does crash, and
take it from there (although the list of changes is usually huge, so
it won't be easy).