PT Run without unexpected errors.
Version: 1.0.0
OS Version: Microsoft Windows NT 10.0.19041.0
IntPtr Length: 8
x64: True
Date: 08/01/2020 07:30:35
Exception:
System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
at _CxxThrowException(Void* , _s__ThrowInfo* )
at interop.KeyboardHook.Start()
at interop.HotkeyManager..ctor()
at PowerLauncher.ViewModel.MainViewModel..ctor(Settings settings)
at PowerLauncher.App.<>c__DisplayClass16_0.
at Wox.Infrastructure.Stopwatch.Normal(String message, Action action)
at PowerLauncher.App.OnStartup(Object sender, StartupEventArgs e)
at System.Windows.Application.OnStartup(StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
From Event viewer:
Application: PowerLauncher.exe CoreCLR Version: 4.700.20.20201 .NET Core Version: 3.1.4 Description: The process was terminated due to an unhandled exception. Exception Info: System.NullReferenceException: Object reference not set to an instance of an object. at PowerLauncher.App.<>c__DisplayClass22_0.
From PT Run Logs:
2020-08-01-PT-Run-issue.txt
_Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form_
Also have from the logs
System.NullReferenceException: Object reference not set to an instance of an object.
Source: PowerLauncher
TargetAssembly: PowerLauncher, Version=0.20.0.0, Culture=neutral, PublicKeyToken=null
TargetModule: PowerLauncher.dll
TargetSite: Void <Dispose>b__0()
at PowerLauncher.App.<>c__DisplayClass22_0.<Dispose>b__0()
at Wox.Infrastructure.Stopwatch.Normal(String message, Action action)
at PowerLauncher.App.Dispose(Boolean disposing)
at PowerLauncher.App.Dispose()
at PowerLauncher.App.Main(String[] args)
bottom is #5537
@crutkas I'm not sure if two are related, but they could be. There's not enough info from the exception log about whether the exception was thrown from SetWindowsHookEx failing or not.
Edit: Just noticed #5611 shows the same error message for PT Run as well, so most likely related.
@Matada can you check if other PowerToys like Shortcut guide or Keyboard Manager are working for you?
believe https://github.com/microsoft/PowerToys/issues/4323 is same issue as this as well.
Shortcut Guide enabled in Settings part and:
Keyboard Manager not working:
@ryanbodrug-microsoft @crutkas Should I mark this as fix-committed? In #6454 I added in code to show a more detailed error message and log telemetry for it, so while the issue isn't actually fixed, we will need to wait for user feedback once they use a build with that change. Other option is to share an unsigned build from current master with the users facing this issue.
See if they are willing to get an unsigned build to test quickly.
@Matada @kevinctech @JDNielsen93 @karthik20 @swpknl We are still trying to debug this error however we haven't been able to reproduce it yet. Would you be willing to try an unsigned build of PowerToys with more detailed error messages so that we can get more information on this error?
We are still trying to debug this error however we haven't been able to reproduce it yet. Would you be willing to try an unsigned build of PowerToys with more detailed error messages so that we can get more information on this error?
@arjunbalgovind Yes
@Matada @kevinctech @JDNielsen93 @karthik20 @swpknl We are still trying to debug this error however we haven't been able to reproduce it yet. Would you be willing to try an unsigned build of PowerToys with more detailed error messages so that we can get more information on this error?
@arjunbalgovind , I installed the new version on a new Surface 3 laptop on a clean slate and it works as expected(all firmware and updates installed). I guess it might not be something directly to do with PowerToys but rather some Firmware/Windows 10 update? I speak for myself here at the moment. May be resetting the Windows might work?
@Matada @kevinctech @JDNielsen93 @karthik20 @swpknl We are still trying to debug this error however we haven't been able to reproduce it yet. Would you be willing to try an unsigned build of PowerToys with more detailed error messages so that we can get more information on this error?
Yes.
Shortcut Guide enabled in Settings part and:
- holding Windows Key doesn't work
- alternative works fine ( Win + Shift + ? )
Keyboard Manager not working:
- click on Remap a key ( Settings ) doesn't work
- click on Remap a shortcut ( Settings ) doesn't work
Those two are fixed and working fine on v0.21.1. Thanks.
@kevinctech @Matada @swpknl @JDNielsen93 @karthik20 can you try installing this unsigned build on the system where you got this error and let us know what error messages appear? Before installing this version please uninstall the release version.
@arjunbalgovind
Upon startup, 2 windows FancyZones and Keyboard Manager appear with "SetWindowsHookEx failed with error 1431: The hook procedure is not installed"
When I open settings and click on Color Picker, FancyZones or PowerToys Run, a window PowerToys - Interop appears with "SetWindowsHookEx failed with error 0: The operation completed successfully." When PowerToys Run is enabled with the default Alt+Space shortcut, the shortcut does not work.
On a related note, since PowerToys is basically unusable for me, I have been using Flow Launcher (based on Wox) instead and the Alt+Space hotkey works fine there.
PT Run log file attached:
2020-09-15.txt
Retest on v0.21.2
Recreation steps as in defect description + I go through Setting menu clicking on each one.
Same errors as commented by @kevinctech, but
PT Run Logs:
2020-09-15.txt
@kevinctech @Matada are there any third-party apps installed on your system which could be blocking hooks? Like an antivirus/firewall, some secure environment app or some form of virtualization? Trying to identify similarities between your systems.
@arjunbalgovind The app I suspect is a corporate client by SentryBay that wraps a Citrix receiver app. However, I also use Flow Launcher and DisplayFusion and the hotkeys for both apps work fine.
@arjunbalgovind I can confirm the same observation as @kevinctech described.
Even after uninstalling app from SentryBay (contains some Keyboard Filter Driver) exception not appears for Release v0.21.1.
I also have a corporate client by SentryBay installed in my PC. I get the following error when I start PowerToys: SetWindowsHookEx failed with error 1431: The hook procedure is not installed. This popup came thrice.
Then a new popup with SetWindowsHookEx failed with error 0: The operation completed successfully.
After opening the settings for PowerToys when I go to ColorPicker, Fancy Run or PowerToys Run, another popup shows, SetWindowsHookEx failed with error 0: The operation completed successfully.
PFA the logs.
2020-09-17.txt
@kevinctech, the hotkeys for those two apps work because they use the RegisterHotkey API and not keyboard hooks. The disadvantage of using RegisterHotkey is that you can't set up hotkeys which use the Windows key (like Win+Space).
Since the issue is with a third party corporate client (SentryBay) we can't resolve this from our end. We recommend looking into whether the corporate client has some option for "trusted apps" and allowing PowerToys as an exception. PowerToys settings, Keyboard Manager, FancyZones, Shortcut Guide, PowerToys Run and ColorPicker use keyboard hooks, so none of these would work as expected.
Most helpful comment
@arjunbalgovind I can confirm the same observation as @kevinctech described.
Even after uninstalling app from SentryBay (contains some Keyboard Filter Driver) exception not appears for Release v0.21.1.