PowerToys: Cannot launch UI elements: faulting module Microsoft.UI.Xaml.dll
Microsoft PowerToys version
0.86.0
Installation method
GitHub
Running as admin
No
Area(s) with issue?
General, Settings, Advanced Paste, PowerToys Run
Steps to reproduce
Installed 0.86.0 (machine-wide) from GitHub on W11 23H2 22631 (multiple machines), both manually and through SCCM.
I get the following error when trying to launch any UI part of PowerToys:
Faulting application name: PowerToys.PowerLauncher.exe, version: 0.86.0.0, time stamp: 0x66e80000
Faulting module name: KERNELBASE.dll, version: 10.0.22621.4391, time stamp: 0x7433a115
Exception code: 0xe0434352
Fault offset: 0x000000000005fa4c
Faulting process ID: 0x0xbb0
Faulting application start time: 0x0x1db3b83c903a38c
Faulting application path: C:\Program Files\PowerToys\PowerToys.PowerLauncher.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Faulting application name: PowerToys.Settings.exe, version: 0.86.0.0, time stamp: 0x66e80000
Faulting module name: Microsoft.UI.Xaml.dll, version: 3.1.6.0, time stamp: 0x0caad657
Exception code: 0xc000027b
Fault offset: 0x0000000000009125
Faulting process ID: 0x0xf24
Faulting application start time: 0x0x1db3b83caefa763
Faulting application path: C:\Program Files\PowerToys\WinUI3Apps\PowerToys.Settings.exe
Faulting module path: C:\Program Files\PowerToys\WinUI3Apps\Microsoft.UI.Xaml.dll
Faulting application name: PowerToys.Peek.UI.exe, version: 0.86.0.0, time stamp: 0x66e80000
Faulting module name: Microsoft.UI.Xaml.dll, version: 3.1.6.0, time stamp: 0x0caad657
Exception code: 0xc000027b
Fault offset: 0x0000000000009125
Faulting process ID: 0x0x1b20
Faulting application start time: 0x0x1db3b84ec20d9a2
Faulting application path: C:\Program Files\PowerToys\WinUI3Apps\PowerToys.Peek.UI.exe
Faulting module path: C:\Program Files\PowerToys\WinUI3Apps\Microsoft.UI.Xaml.dll
Trying to generate a debug report results in (likely because diagnostics is disabled through GPO):
Application: PowerToys.PowerLauncher.exe
CoreCLR Version: 8.0.1024.46610
.NET Version: 8.0.10
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidCastException: Unable to cast object of type 'System.Byte[]' to type 'System.Int32'.
at Microsoft.PowerToys.Telemetry.DataDiagnosticsSettings.GetEnabledValue()
at Microsoft.PowerToys.Telemetry.ETWTrace..ctor()
at PowerLauncher.App..ctor()
at PowerLauncher.App.Main()
✔️ Expected Behavior
Any UI element of PowerToys opens as expected.
❌ Actual Behavior
Nothing opens (the icon is visible in the system tray), and occasionally, the system hangs (especially when trying to do something with advanced paste).
Interestingly, Always On Top works perfectly. Running the application as an administrator also works perfectly (no GPO enforced).
Other Software
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 19 (2 by maintainers)
Fixed and should be release with upcoming PowerToys version
Thanks! Hopefully that will fix it forever, this was a nightmare 🙂
I suppose the issue lies here at this line:
https://github.com/microsoft/PowerToys/blob/c2895520db89bcd0c5729a890b7f724b12985b7b/src/common/SettingsAPI/settings_helpers.cpp#L179
if (RegSetValueExW(key, DataDiagnosticsRegValueName, 0, REG_QWORD, reinterpret_cast<const BYTE*>(&value), buf_size) != ERROR_SUCCESS)It saves the boolean value as a QWORD which doesn’t sound right. Should be a DWORD.
Ahoi hoi, sorry for my bad English.
We have/had the same Problem.
We are using GroupPolicies to activate/deactivate PowerToys functions. We also deactivated “Allow sending diagnistic data”.
After the Policy was set and PowerToys in Version 0.86.0 or higher is started, there will be a RegKey generated as written by CatGamer23.
If Policy is set under UseContext -> HKCU\Software\Classes\PowerToys -> Key AllowDataDiagnostics with corrupted Data.
Only if we activate oder Remove “Allow sending diagnistic data” in Policies and remove the “HKCU\Software\Classes\PowerToys” RegKey, the PowerToys Settings are starting again.
Only deactivating the Policy does not work, because the “HKCU\Software\Classes\PowerToys” is still set. Even if you remove PowerToys. The RegKey is still there.
I hope i was able to help someone.
Thank to CatGamer23 to show me the way to find a solution 😉