PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Unable to load PowerToys settings app version > 0.59

Open jaimecbernardo opened this issue 2 years ago • 14 comments

Microsoft PowerToys version

0.59

Running as admin

  • [ ] Yes

Area(s) with issue?

Settings

Steps to reproduce

This issue is a continuation of https://github.com/microsoft/PowerToys/issues/18015 , since some of the issues there are already solved, to clean up a bit and update the version.

Settings still won't start and needs to be added as an exception to software like H24, MSI Afterburner, RivaTuner Statistics Server or HW64 if you're using it.

In case this doesn't help, it's useful if you can send a dump report through these instructions:

One way of achieving this would be by creating an entry in the Registry Editor (regedit.msc), for Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\PowerToys.Settings.exe , according to the instructions in https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps

It should look something like this in the end: image

After that, please replicate the bug, navigate to $LOCALAPPDATA%\CrashDumps in the File Explorer and upload the zipped PowerToys.Settings.exe.*.dmp file to a GitHub comment.

The idea is that this could show us the stack trace and help pinpoint what the issue might be.

✔️ Expected Behavior

Settings app opens after clicking settings button in tray.

❌ Actual Behavior

Nothing happens when clicking settings button in tray.

Other Software

H24, MSI Afterburner, RivaTuner Statistics Server, HW64

jaimecbernardo avatar Jun 09 '22 11:06 jaimecbernardo

just for your notice: MSI Afterburner does not have any issue with this, it's only the RivaTuner Statistics Server (RTSS), which also comes bundled with MSI AB, where a hook exception has to be made.

AndyK70 avatar Jun 10 '22 00:06 AndyK70

See zipped crash dump. Thanks! PowerToys.Settings.exe.13896.dmp.zip

I also see in %LOCALAPPDATA%\CrashDumps dmp files for PowerToys.ColorPickerUI.exe and PowerToys.PowerLauncher.exe

I reverted to an earlier release (I think it was 0.57.2) in order to to open settings without crashing.

FancyZones was still crashing with the same "Security check failure or stack buffer overrun" in the crash dump files. I reverted to 0.55.2 and now I'm able to use FancyZones.

I've tried:

  • Run SFC and DISM scan
  • Repair upgrade with Windows 10 ISO
  • Updated .NET 6 to the latest version

jspilinek avatar Jun 21 '22 17:06 jspilinek

Hi @jspilinek , what I see here is that we have an exception with the message "Indirect call guard check detected invalid control transfer." occurring.

For the .net installed you're using the ".net for Desktop apps", correct? The stack buffer overrun has happened before for users who were using software like the RivaTuner Statistics Server mentioned before, that was adding some code to the binaries in memory and causing that. Do you have some software of the sort?

0.56 was the version where we updated to .net 6 and seems like it was the one that stopped working for you regarding FancyZones.

jaimecbernardo avatar Jun 24 '22 12:06 jaimecbernardo

I was having a similar issue on a fresh install of win11, installing 0.59.1 via winget. RTSS not installed, nor any of the other mentioned software. Settings window would not open, FancyZones functioned, but the zone editor would not open. reverting to 0.57.2 allowed settings to open, but the fancyzones editor still did not function. Reverted to 0.55.2 in an attempt to get the zone editor to open, without success. Uninstalled and returned to 0.59.1 and enabled crashdumps, none were created when attempting to open the settings window.

On a hunch I downloaded the latest version of the .NET 6.0 Desktop Runtime (v6.0.6), and now the settings window and zone editor open.

I've attached the most recent pre-fix bug report .zip in case it might be helpful. PowerToysReport_2022-06-23-11-10-27.zip

seancatchpole avatar Jun 24 '22 13:06 seancatchpole

@jaimecbernardo, earlier I had updated the .NET SDK. I just installed .NET Desktop Runtime 6.0.6 but still see these crashes with PowerToys 0.59.1

I'm not using the other apps mentioned: H24, MSI Afterburner, RivaTuner Statistics Server, HW64

jspilinek avatar Jun 24 '22 13:06 jspilinek

I don't know if this will help anyone but I had this issue in 0.58 and I fixed it by right clicking the settings executable and unchecking run as admin from the properties menu. I didn't have a github account back then so I'm posting this now in case it helps anyone. I also have rtss running and I have set it to not detect powertoys settings but it didn't fix the problem on its own. Wndows 10 64bit.

resrep2 avatar Jul 08 '22 22:07 resrep2

0.63.0 powertoy settings app is crashing for me with the below callstack. 0.62.0 was fine. This is on Version 22H2 Build 22621.608.

[0x0] KERNELBASE!RaiseException + 0x6c
[0x1] coreclr!__FrameHandler4::CxxCallCatchBlock + 0x1b0
[0x2] ntdll!RcConsolidateFrames + 0x6
[0x3] coreclr!AppDomain::TryIncrementalLoad + 0xa8
[0x4] coreclr!AppDomain::LoadDomainFile + 0xa6
[0x5] coreclr!AppDomain::LoadDomainFile + 0xf1
[0x6] coreclr!DomainFile::EnsureLoadLevel + 0x34
[0x7] coreclr!DomainFile::EnsureActive + 0xd
[0x8] coreclr!Module::EnsureActive + 0x14
[0x9] coreclr!MethodTable::EnsureInstanceActive + 0x2c
[0xa] coreclr!MethodDesc::EnsureActive + 0x5b
[0xb] coreclr!MethodDescCallSite::MethodDescCallSite + 0x4a
[0xc] coreclr!RunMainInternal + 0x23
[0xd] coreclr!RunMain + 0xd2
[0xe] coreclr!Assembly::ExecuteMainMethod + 0x1c9
[0xf] coreclr!CorHost2::ExecuteAssembly + 0x1c6
[0x10] coreclr!coreclr_execute_assembly + 0xe2
[0x11] hostpolicy!coreclr_t::execute_assembly + 0x2a
[0x12] hostpolicy!run_app_for_context + 0x56b
[0x13] hostpolicy!run_app + 0x3c
[0x14] hostpolicy!corehost_main + 0x107
[0x15] hostfxr!execute_app + 0x2e9
[0x16] hostfxr!`anonymous namespace'::read_config_and_execute + 0xa6
[0x17] hostfxr!fx_muxer_t::handle_exec_host_command + 0x161
[0x18] hostfxr!fx_muxer_t::execute + 0x482
[0x19] hostfxr!hostfxr_main_startupinfo + 0xab
[0x1a] apphost + 0x11f88
[0x1b] apphost + 0x122fb
[0x1c] apphost + 0x137a8
[0x1d] KERNEL32!BaseThreadInitThunk + 0x1d
[0x1e] ntdll!RtlUserThreadStart + 0x28

mikesart avatar Oct 08 '22 21:10 mikesart

@mikesart how did you install powertoys? scoop?

crutkas avatar Oct 14 '22 03:10 crutkas

Yes - and it was working with 0.62.0 and 0.62.1 before the 0.63.0 update.

mikesart avatar Oct 14 '22 03:10 mikesart

Hi @mikesart , please try this workaround: https://github.com/microsoft/PowerToys/issues/21108#issuecomment-1272476310

jaimecbernardo avatar Oct 14 '22 08:10 jaimecbernardo

just for your notice: MSI Afterburner does not have any issue with this, it's only the RivaTuner Statistics Server (RTSS), which also comes bundled with MSI AB, where a hook exception has to be made.

Adding to this: In actual Rivatuner Statistics Server installation (7.3.4 beta) there is now a predefined default exclusion for PowerToys.exe, PowerToysSettings.exe and even PowerToys.FancyZones.exe This should remove any issues regarding RTSS and PowerToys. And please remove the wrong information from readme that MSI Afterburner has something to with this, it has not. It is the bundled RTSS. Any user using RTSS standalone or bundled with MSI AB should update to latest RTSS beta or latest official MSI AB (4.6.5 beta 2) which includes the RTSS 7.3.4 beta and the needed PowerToys exclusions.

AndyK70 avatar Oct 14 '22 10:10 AndyK70

@jaimecbernardo It worked - thank you very much!

mikesart avatar Oct 14 '22 21:10 mikesart

I do not have RTSS or MSI Afterburner installed. When I first try to open the settings app, it fails and this is logged in the Windows Event Viewer:

Faulting application name: PowerToys.Settings.exe, version: 0.63.0.0, time stamp: 0x62fff1bf
Faulting module name: Microsoft.InputStateManager.dll, version: 10.0.22621.1006, time stamp: 0x9e354968
Exception code: 0xc0000409
Fault offset: 0x000000000001269e
Faulting process id: 0x5f34
Faulting application start time: 0x01d8f392f79faf88
Faulting application path: C:\Program Files\PowerToys\Settings\PowerToys.Settings.exe
Faulting module path: C:\Program Files\PowerToys\Settings\Microsoft.InputStateManager.dll
Report Id: 847e705b-84fd-4fdb-a90b-91d0c27fe991
Faulting package full name: 
Faulting package-relative application ID: 

After the first failure, the second time I try the settings app opens correctly. This repeats every day after shutting down Windows and booting up again the next morning.

Here is a dump: PowerToys.Settings.exe.24372.dmp.zip

lucaspimentel avatar Nov 08 '22 17:11 lucaspimentel

I too had this problem on v0.64.1 with no MSI Afterburner installed. I attempted to open the settings from the tray icon however nothing happened. Looking at the event viewer it seems there was an error coming from the .NET Runtime:
Screenshot_20221124_171644
I then manually downloaded the .NET Desktop Runtime and everything seemed to work normally again. Hopefully this helps someone

ItzAfroBoy avatar Nov 24 '22 17:11 ItzAfroBoy

I've been using v0.55.2 as a workaround. I updated to v0.64.1 and I tried @ItzAfroBoy's suggestion but didn't work for me.

I was able to resolve the issue. Below are the steps I took.

I used WinDbg to analyze the crash dump. I noticed the following:

FAULTING_SOURCE_LINE: D:\a\_work\1\s\src\coreclr\vm\profilinghelper.cpp

My laptop used to have the SSD partitioned into C: and D: drives. I was running out of space on the C: drive. IT eliminated the D: drive and maximized the C: drive. I no longer have a D: drive so I knew the above error indicates it's looking in the wrong directory path.

I searched through the windows registry but couldn't find any references to D: drive.

I tried running "dotnet --info" from command prompt, but nothing was displayed. I noticed that dotnet was also crash dumping when I rand this command.

I reviewed my environment variables and noticed the following:

  • CORECLR_ENABLE_PROFILING=0X01
  • CORECLR_PROFILER={...}
  • CORECLR_PROFILER_PATH_64=C:\ptc\PSM_7.0\agent\lib64\dtagent.dll

dtagent.dll is for Dynatrace App Mon. I'm no longer using this app so I deleted all three of these environment variables. Restarted and now I can open PowerToys settings and FancyZones. "dotnet --info" command is also working now.

jspilinek avatar Nov 28 '22 16:11 jspilinek

Encountered the issue on 0.66.0 as well, though it was working for me in 0.65.0

Faulting application name: PowerToys.Settings.exe, version: 0.66.0.0, time stamp: 0x6377ba57 Faulting module name: KERNELBASE.dll, version: 10.0.19041.2364, time stamp: 0x5b7d4d22 Exception code: 0xc000027b Fault offset: 0x000000000010fe32 Faulting process id: 0x2c4c Faulting application start time: 0x01d9250d8577bbb4 Faulting application path: C:\Program Files\PowerToys\Settings\PowerToys.Settings.exe Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll Report Id: 8ba34617-119b-458d-899d-14292bdf93e4 Faulting package full name: Faulting package-relative application ID:

I updated using the built-in update method.

FYI - I am unable to attach the crash dumps via a comment as I'm getting a 503 back from the uploader.

jheiselman avatar Jan 10 '23 16:01 jheiselman

I just uninstalled all version of the .Net Desktop Runtime and PowerToys then reinstalled PowerToys via the Github releases download and it is working for me.

jheiselman avatar Jan 10 '23 17:01 jheiselman

Great! .66 has the runtimes self-contained so we hoped this would have magically "solved" itself :)

@jaimecbernardo we should be able to close this out, correct?

crutkas avatar Jan 10 '23 17:01 crutkas

I'm not really sure that it "magically" solved itself as I had to remove my previously installed versions of the runtimes. This could be problematic for folks who need those installed for other reasons. I'm still not sure that I didn't need them for some other piece of software on my host.

jheiselman avatar Jan 10 '23 17:01 jheiselman

@jheiselman the new version should have zero dependencies on prior installed runtimes

crutkas avatar Jan 10 '23 18:01 crutkas

@crutkas That may be, but there was still a conflict with prior installed runtimes in my case. It would not work for me until I uninstalled the other instances and then re-installed the PowerToys package itself.

jheiselman avatar Jan 10 '23 18:01 jheiselman

Uninststalling prior .Net runtimes is not an option for me either. I have a few other apps that require those & those are way more important than getting into the PowerToys settings(my Fancy Zones still work & I don't use anything else). I'd rather leave it be & let you guys fix the problem with a newer version.

PowerToysReport_2023-01-12-08-52-34.zip

AzBat360 avatar Jan 12 '23 15:01 AzBat360

Nothing GUI-related works for me since v.0.60. FancyZones snapping does though. No error message. Added registry settings as advised above, but no crash dump generated. Event viewer says this:

Description: A .NET application failed.
Application: PowerToys.Settings.exe
Path: C:\Program Files\PowerToys\Settings\PowerToys.Settings.exe
Message: Failed to create CoreCLR, HRESULT: 0x80004005

There are entries for a bunch of different PowerToys application modules.

None of the abovementioned software is installed. Windows 10 21H1

jstaro avatar Jan 13 '23 20:01 jstaro

@jstaro how do you install the app? Via scoop?

crutkas avatar Jan 14 '23 05:01 crutkas

Sorry, yes, that's correct.

> dotnet --list-sdks
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.105 [C:\Program Files\dotnet\sdk]
2.1.302 [C:\Program Files\dotnet\sdk]
3.1.426 [C:\Program Files\dotnet\sdk]
5.0.100 [C:\Program Files\dotnet\sdk]
5.0.104 [C:\Program Files\dotnet\sdk]
5.0.408 [C:\Program Files\dotnet\sdk]
6.0.112 [C:\Program Files\dotnet\sdk]
7.0.100 [C:\Program Files\dotnet\sdk]
7.0.101 [C:\Program Files\dotnet\sdk]

jstaro avatar Jan 14 '23 11:01 jstaro

My bad, I was using powertoys-np from the nonportable bucket, but I see now there is a powertoys in the extras bucket. Installed 0.66 from there and now it works. Feel free to hide my posts :)

jstaro avatar Jan 15 '23 15:01 jstaro

The latest conversations seem to have been related to non - official install methods, so I think this issue can be closed as completed.

jaimecbernardo avatar Jan 24 '23 09:01 jaimecbernardo