Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows 11 taskbar Styler] Crash when "Taskbar Overflow menu" is present #478

Open
Nojevah opened this issue Jan 15, 2024 · 5 comments
Open
Labels
mod-bug Something isn't working with a mod

Comments

@Nojevah
Copy link

Nojevah commented Jan 15, 2024

Mod: Windows 11 taskbar Styler by @m417z

When "Taskbar Overflow menu" appears, explorer.exe crashes.
Details:
My system: Windows 11 Home 22H2 22621.3007, WH 1.4.1 and W11 Taskbar Styler 1.2.3
"Taskbar Overflow menu" is a menu in Windows 11 which appears when there are more than 17 Apps opened (or more). Ellipses appear to group windows from the same app.

To reproduce:

  • disable all other mods to be sure
  • enable only W11 Taskbar Styler
  • empty W11 Taskbar Styler settings (delete windows-11-taskbar-styler > Settings key, backup first obviously)
  • open a lot of apps until "Taskbar Overflow menu" (TOM) appears
  • now close 1 or 2 windows until TOM disappears
  • open 1 or 2 windows until TOM appears
  • you might need to repeat these 2 steps but at some point

===> Explorer crashes

short and longer video example

ZZ_20240115_1919.mp4
ZZ_20240115_1920.mp4
@Nojevah Nojevah added the mod-bug Something isn't working with a mod label Jan 15, 2024
@Nojevah
Copy link
Author

Nojevah commented Jan 15, 2024

Not sure if it's useful, debug log when it crashes:
WH_Crashes.txt

@m417z
Copy link
Member

m417z commented Jan 16, 2024

I'll take a look when I have some time. Meanwhile, can you capture a crash dump? You should be able to get it with the following steps:

  • Open regedit
  • Go to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting
  • Create a key named LocalDumps
  • Create a DWORD value named DumpType with value 2
  • Trigger the crash
  • Go to the %LocalAppData%\CrashDumps folder, you should see a dump file in there

@Nojevah
Copy link
Author

Nojevah commented Jan 16, 2024

Ouch, 800 MB the dump. I've upload it (compressed) on a drive for some time: https://drive.google.com/file/d/1-i1xIbZXG0d1RxPUuXDFV4qq6xX1ORYf/view?usp=sharing
FWIW, it's not that important, it's the first time I've seen this Taskbar Overflow menu.

@m417z
Copy link
Member

m417z commented Feb 3, 2024

I looked at the dump file. The exception code is:

E_INVALIDARG - One or more arguments are not valid

And it happens near winrt::Windows::UI::Xaml::IFrameworkElementOverridesT<winrt::Taskbar::implementation::Badge>::ArrangeOverride
So something related to arranging a taskbar badge.

I tried to reproduce the crash with your steps with Windows 11 version 22H2 (OS Build 22621.3085), but without success.

Perhaps you checked it, but did you test it with and without the taskbar styler mod? Can you clearly see that the mod causes the problem? I'm asking because it's possible that it's a Windows bug or something else unrelated to the mod.

@m417z
Copy link
Member

m417z commented Feb 3, 2024

After several additional attempts, I was able to reproduce the crash. The E_INVALIDARG error is raised in the following function:
CDirectManipulationService::ActivateDirectManipulationManager
Which is only called when the Windows UI manipulation mechanism is used. It's nothing specific to the mod, I was able to reproduce the crash with a modified version of the mod with most functionality removed, and also with UWPSpy. It seems to be a Windows bug in the UI inspection mechanism. I believe that other tools that use this mechanism, such as TranslucentTB, trigger the bug as well, but I didn't try it.

I could try and fix or at least forcefully ignore this error, but it's tricky since the easiest way to do something about it is to use the symbols of Windows.UI.Xaml.dll, but they're huge, around 350 MB, which will considerably slow down the mod loading. If this issue becomes more common, I'll consider implementing such a workaround, which will probably be optional and off by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod-bug Something isn't working with a mod
Projects
None yet
Development

No branches or pull requests

2 participants