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

Keyboard Manager cannot start editor #31708

Closed
paulhybryant opened this issue Mar 5, 2024 · 36 comments
Closed

Keyboard Manager cannot start editor #31708

paulhybryant opened this issue Mar 5, 2024 · 36 comments
Assignees
Labels
Hot Fix Items we will product an out-of-band release for Issue-Bug Something isn't working Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-High Bugs that we consider a blocking issue for release (crashes stuff outside of PT)

Comments

@paulhybryant
Copy link

paulhybryant commented Mar 5, 2024

Microsoft PowerToys version

0.79.0, 0.78.0

Installation method

WinGet

Running as admin

No

Area(s) with issue?

Keyboard Manager

Steps to reproduce

Open keyboard manager
Click remap key

✔️ Expected Behavior

The editor should start

❌ Actual Behavior

Nothing happens

This happens on windows 10, but it works ok on windows 11

See something like this in the log:
[2024-03-05 13:26:34.174067] [p-9392] [t-23028] [info] keyboard-manager logger is initialized
[2024-03-05 13:26:34.250143] [p-9392] [t-23028] [trace] Created/Opened Local\PowerToys_KBMEditor_InstanceMutex mutex
[2024-03-05 13:26:34.250249] [p-9392] [t-23028] [trace] Editor started from the settings with pid 22392
[2024-03-05 13:26:34.251609] [p-9392] [t-23028] [trace] SettingsHelper::LoadSettings()
[2024-03-05 13:26:34.252470] [p-9392] [t-23028] [trace] CreateEditKeyboardWindowImpl()
[2024-03-05 13:26:34.252571] [p-9392] [t-23028] [trace] Signaled PowerToys_KeyboardManager_Event_EditorWindow event to suspend the KBM engine
[2024-03-05 13:26:34.283217] [p-9392] [t-23028] [info] Theme is now Light
[2024-03-05 13:26:34.285527] [p-9392] [t-23028] [trace] XamlBridge2::InitBridge()
[2024-03-05 13:26:34.306984] [p-9392] [t-23028] [error] UNKNOWN EXCEPTION
[2024-03-05 13:26:34.307155] [p-9392] [t-23028] [error] Failed to get a symbol. ᅧᅯᅪᄐ애ᅫᅧᅫ￞￐ᄃ샤ᄉ￘ᅱᄋᄀᆪ
[2024-03-05 13:26:34.307260] [p-9392] [t-23028] [error] Failed to get a symbol. ᅧᅯᅪᄐ애ᅫᅧᅫ￞￐ᄃ샤ᄉ￘ᅱᄋᄀᆪ
[2024-03-05 13:26:34.307659] [p-9392] [t-23028] [error] Failed to get a symbol. ᅧᅯᅪᄐ애ᅫᅧᅫ￞￐ᄃ샤ᄉ￘ᅱᄋᄀᆪ
[2024-03-05 13:26:34.307736] [p-9392] [t-23028] [error] Failed to get a symbol. ᅧᅯᅪᄐ애ᅫᅧᅫ￞￐ᄃ샤ᄉ￘ᅱᄋᄀᆪ
[2024-03-05 13:26:34.307816] [p-9392] [t-23028] [error] Failed to get a symbol. ᅧᅯᅪᄐ애ᅫᅧᅫ￞￐ᄃ샤ᄉ￘ᅱᄋᄀᆪ
[2024-03-05 13:26:34.307905] [p-9392] [t-23028] [error] Failed to get a symbol. ᅧᅯᅪᄐ애ᅫᅧᅫ￞￐ᄃ샤ᄉ￘ᅱᄋᄀᆪ
[2024-03-05 13:26:34.307990] [p-9392] [t-23028] [error] Failed to get a symbol. ᅧᅯᅪᄐ애ᅫᅧᅫ￞￐ᄃ샤ᄉ￘ᅱᄋᄀᆪ
[2024-03-05 13:26:34.308071] [p-9392] [t-23028] [error] Failed to get a symbol. ᅧᅯᅪᄐ애ᅫᅧᅫ￞￐ᄃ샤ᄉ￘ᅱᄋᄀᆪ
[2024-03-05 13:26:34.308167] [p-9392] [t-23028] [error] Failed to get a symbol. ᅧᅯᅪᄐ애ᅫᅧᅫ￞￐ᄃ샤ᄉ￘ᅱᄋᄀᆪ
[2024-03-05 13:26:34.308255] [p-9392] [t-23028] [error] Failed to get a symbol. ᅧᅯᅪᄐ애ᅫᅧᅫ￞￐ᄃ샤ᄉ￘ᅱᄋᄀᆪ
[2024-03-05 13:26:34.308356] [p-9392] [t-23028] [error] STACK TRACE
C:\Users\paulh\AppData\Local\PowerToys\KeyboardManagerEditor!
C:\Users\paulh\AppData\Local\PowerToys\KeyboardManagerEditor!
C:\WINDOWS\System32!UnhandledExceptionFilter
C:\WINDOWS\SYSTEM32!memset
C:\WINDOWS\SYSTEM32!_C_specific_handler
C:\WINDOWS\SYSTEM32!_chkstk
C:\WINDOWS\SYSTEM32!RtlRaiseException
C:\WINDOWS\SYSTEM32!RtlRaiseException
C:\WINDOWS\System32!RaiseException
C:\Users\paulh\AppData\Local\PowerToys\KeyboardManagerEditor!
C:\Users\paulh\AppData\Local\PowerToys\KeyboardManagerEditor!
C:\Users\paulh\AppData\Local\PowerToys\KeyboardManagerEditor!
C:\Users\paulh\AppData\Local\PowerToys\KeyboardManagerEditor!
C:\Users\paulh\AppData\Local\PowerToys\KeyboardManagerEditor!
C:\Users\paulh\AppData\Local\PowerToys\KeyboardManagerEditor!
C:\Users\paulh\AppData\Local\PowerToys\KeyboardManagerEditor!
C:\Users\paulh\AppData\Local\PowerToys\KeyboardManagerEditor!
C:\WINDOWS\System32!BaseThreadInitThunk
C:\WINDOWS\SYSTEM32!RtlUserThreadStart

Other Software

No response

@paulhybryant paulhybryant added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Mar 5, 2024
@jaimecbernardo
Copy link
Collaborator

Which Windows 10 version is this? /bugreport

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Mar 5, 2024
@paulhybryant
Copy link
Author

Uploading PowerToysReport_2024-03-06-09-08-30.zip…
Here it is. Thanks!

@paulhybryant
Copy link
Author

It is Windows 10 Professional 22H2 @jaimecbernardo

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Mar 6, 2024
@jaimecbernardo
Copy link
Collaborator

Uploading PowerToysReport_2024-03-06-09-08-30.zip… Here it is. Thanks!

Hi @paulhybryant , I think you didn't wait for the upload to GitHub to finish 😅 . I can't seem to dowload it. Can you please re-upload?

@paulhybryant
Copy link
Author

PowerToysReport_2024-03-06-18-28-37.zip

uploaded again.

@CarloHD
Copy link

CarloHD commented Mar 6, 2024

Same problem on Windows 11 Home, Version 23H2, Build 22631.3235 , Windows Feature Experience Pack 1000.22687.1000.0, PowerToys 0.79.0 run with admin permission.
can't open key mapping editor.

PowerToysReport_2024-03-07-00-16-55.zip

Registrazione.2024-03-07.002142.mp4

@jaimecbernardo jaimecbernardo added Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Mar 7, 2024
@jaimecbernardo
Copy link
Collaborator

Hi @paulhybryant @CarloHD ,
I've checked the bug reports and tried to reproduce on some machines, but without success. Looks like there's some events on Event Viewer, meaning we might get some information from a crash dump.

Could you please send a dump file?

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.KeyboardManagerEditor.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 PowerToysManagerEditor.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.
/needinfo

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Team-Response An issue author responded so the team needs to follow up labels Mar 7, 2024
@jaimecbernardo jaimecbernardo added the Severity-High Bugs that we consider a blocking issue for release (crashes stuff outside of PT) label Mar 7, 2024
@jaimecbernardo
Copy link
Collaborator

This seems to be crashing on this line from our code in XamlBridge2.cpp:

// Prep for the WinUI resources
auto app = Microsoft::Toolkit::Win32::UI::XamlHost::XamlApplication({ Microsoft::UI::Xaml::XamlTypeInfo::XamlControlsXamlMetaDataProvider() });

There's some issue with initializing the Xaml Windows on the users machines, but it's not clear what it is... Unfortunately we can't seem to repro it or have enough enough information in the crashdump to figure out what it is. It says there's an unavailable resource, but the installation of PowerToys has all the necessary files according to the bug report. This means it's likely some other resource that should be present in the system folders and isn't 🤔
We do want to drop XAML islands and use actual XAML files so we can use another technology for the editors, but that might still take a while.

Did the editor work for you in PowerToys 0.78? You can try this by uninstalling 0.79 and installing 0.78 to double check that. Thanks, in advance.

@CarloHD
Copy link

CarloHD commented Mar 8, 2024

on 0.78 works

@jaimecbernardo
Copy link
Collaborator

on 0.78 works

Thank you! My theory is bust, then :)
Back to the analysis board. Perhaps later I'll ask you test some debug builds, if that's OK with you?

@CarloHD
Copy link

CarloHD commented Mar 8, 2024

Perhaps later I'll ask you test some debug builds, if that's OK with you?

Yeah, no problem, maybe my response doesn't will be rapids like now, but I'll respond asap

@jaimecbernardo jaimecbernardo removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Mar 8, 2024
@jaimecbernardo
Copy link
Collaborator

Hi @CarloHD,

I'm sending 4 builds to try what might be wrong. Can you please say which of these ones work for you? Inside each zip you'll find "EditKeys.bat" and "EditShortcuts.bat" to make it easier to start KeyboardManagerEditor as a standalone application. I think it's best to try these without PowerToys running at the same time.
Can you please let me know which of these versions work?

1 - Keyboard Manager Editor 0.78 but built locally.
KBMEditor78.zip

2 - Keyboard Manager Editor 0.79 but built locally.
KBMEditor79.zip

3 - Keyboard Manager Editor 0.79 build locally without the chords and start app feature.
KBMEditor79revertchords.zip

4 - Keyboard Manager Editor 0.79 build locally without the chords and start app feature and no CppWinRT update.
KBMEditor79RevertCppWinRT.zip

Thanks, in advance. This is to help in understand if it's something related to the release server, or any of the recent changes that we did in Keyboard Manager Editor.

@CarloHD
Copy link

CarloHD commented Mar 8, 2024

I've closed PowerToys from the tray bar, so there's no instance of PowerToys running, but no one ".bat" files open the KeyboardManager.

this is what i have on the prompt for every ".bat":

1 - Keyboard Manager Editor 0.78 but built locally.

EditKeys.bat

D:\carlo\Desktop\KBMEditor78>PowerToys.KeyboardManagerEditor.exe 0
[processo terminato con codice 3765269347 (0xe06d7363)]

EditShortcuts.bat

D:\carlo\Desktop\KBMEditor78>PowerToys.KeyboardManagerEditor.exe 1

[processo terminato con codice 3765269347 (0xe06d7363)]

2 - Keyboard Manager Editor 0.79 but built locally.

EditKeys

D:\carlo\Desktop\KBMEditor79>PowerToys.KeyboardManagerEditor.exe 0

[processo terminato con codice 3765269347 (0xe06d7363)]

EditShortcuts

D:\carlo\Desktop\KBMEditor79>PowerToys.KeyboardManagerEditor.exe 1

[processo terminato con codice 3765269347 (0xe06d7363)]

3 - Keyboard Manager Editor 0.79 build locally without the chords and start app feature.

EditKeys

D:\carlo\Desktop\KBMEditor79revertchords>PowerToys.KeyboardManagerEditor.exe 0

[processo terminato con codice 3765269347 (0xe06d7363)]

EditShortcuts

D:\carlo\Desktop\KBMEditor79revertchords>PowerToys.KeyboardManagerEditor.exe 1

[processo terminato con codice 3765269347 (0xe06d7363)]

4 - Keyboard Manager Editor 0.79 build locally without the chords and start app feature and no CppWinRT update.

EditKeys

D:\carlo\Desktop\KBMEditor79RevertCppWinRT>PowerToys.KeyboardManagerEditor.exe 0

[processo terminato con codice 3765269347 (0xe06d7363)]

EditShortcuts

D:\carlo\Desktop\KBMEditor79RevertCppWinRT>PowerToys.KeyboardManagerEditor.exe 1

[processo terminato con codice 3765269347 (0xe06d7363)]

between the square brackets they say "process terminated with code ..."

@paulhybryant
Copy link
Author

paulhybryant commented Mar 9, 2024 via email

@paulhybryant
Copy link
Author

paulhybryant commented Mar 9, 2024 via email

@jjsomanytabs
Copy link

Am also experiencing this issue. Neither "Remap a key" nor "Remap a shortcut" will successfully launch. I tried fully uninstalling, then reinstalling PowerToys, but that didn't help.

PowerToysReport_2024-03-09-15-49-45.zip

@tip010
Copy link

tip010 commented Mar 30, 2024

残念ですが私はこの問題の解決に貢献できないかもしれません。
0.78のkeyboardmanagerを試しましたが、keyboardmanagerのアプリを開けませんでした(もしかすると私の気づかないうちにセキュリティソフトが働いた結果かもしれませんが)。ここにいる皆さんの報告を見るに、他のバージョンを試してもうまくいかないでしょうね。
Unfortunately I may not be able to contribute to solving this problem. I tried the 0.78 keyboardmanager, but could not open the keyboardmanager app (possibly as a result of security software working without my noticing). From the reports of everyone here, I'm guessing that trying other versions won't work.

@Bunea-Rares
Copy link

Bunea-Rares commented Mar 30, 2024

This is my first experience with the Keyboard Manager so I'm not sure for what to expect.

I've tried the builds:

1 - Keyboard Manager Editor 0.78 but built locally.

image
image

I've remapped the A to CTRL+C, I get a warning, but it does work after opening the powertoys.

image

2 - Keyboard Manager Editor 0.79 but built locally.

Not opening

3 - Keyboard Manager Editor 0.79 build locally without the chords and start app feature.

Not opening

4 - Keyboard Manager Editor 0.79 build locally without the chords and start app feature and no CppWinRT update.

Opening, same behaivour like Keyboard Manager Editor 0.78 but built locally.

EDIT: After opening the PowerToys the remaping works!

@tip010
Copy link

tip010 commented Apr 3, 2024

さきほど、なぜかキーボードマネージャがうまく機能するようになりました。(普通のバージョン0.79です)この直前まで、私はOnedriveに大量のデータを送っていました。このとき、データ送信を円滑に行うために、PowerToysと無関係ないくつかのソフトと”PowerToys.Runner"の動作を、タスクマネージャによって止めました。もしかするとこのことと関係があるかもしれません。
Just now, for some reason, the keyboard manager is working fine (normal version 0.79). Just before this, I was sending a lot of data to Onedrive. At that time, by using the task manager, I stopped some software not related to PowerToys and "PowerToys.Runner" from running, in order to facilitate the data transmission. This may have something to do with it.

@CarloHD
Copy link

CarloHD commented Apr 3, 2024

I confirm, the keymap editor is working again, I did not make any changes to the system other than automatically updating the Windows build to version 22631.3374, and Windows Feature Experience Pack to version 1000.22688.1000.0,

@rellevart1
Copy link

rellevart1 commented Apr 4, 2024

This was happening to me I installed the Microsoft c++ runtime libraries and it started working.

@DaveTheFinder
Copy link

This was happening to me I installed the Microsoft c++ runtime libraries and it started working.

I can confirm that this worked for me as well. I had the same issue as everyone listed above, but @rellevart1 option made my app work again.

@paulhybryant
Copy link
Author

paulhybryant commented Apr 7, 2024 via email

@jaimecbernardo
Copy link
Collaborator

I've been able to reproduce this now, after uninstalling the VC runtime on a VM. It seems after the CppWinRT upgrade, we took dependencies on libraries that are not even present on the Keyboard Manager Editor folder. With use of sysinternal's Process Monitor tool, I'm able to see the files that Keyboard Manager Editor tries to open without success.
Will try to add them and see if this fixes the issue. Thank you all for the information.

@jaimecbernardo
Copy link
Collaborator

Anyone on this thread that still has this issue, we're planning of making some changes to hopefully get this fixed.
If you can, please give this KeyboardManagerEditor a try:
KBMEditor80hotfix.zip

Inside the zip you'll find "EditKeys.bat" and "EditShortcuts.bat" to make it easier to start KeyboardManagerEditor as a standalone application.
Please let me know if it works for you.

@jaimecbernardo jaimecbernardo added the Status-In progress This issue or work-item is under development label Apr 8, 2024
@jaimecbernardo jaimecbernardo self-assigned this Apr 8, 2024
@jaimecbernardo jaimecbernardo added the Hot Fix Items we will product an out-of-band release for label Apr 8, 2024
@jaimecbernardo jaimecbernardo added Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Status-In progress This issue or work-item is under development labels Apr 9, 2024
@jaimecbernardo
Copy link
Collaborator

This one should be fixed with the 0.80.1 hotfix. Please update to the latest version: https://github.com/microsoft/PowerToys/releases

@microsoft microsoft deleted a comment from CarloHD May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hot Fix Items we will product an out-of-band release for Issue-Bug Something isn't working Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-High Bugs that we consider a blocking issue for release (crashes stuff outside of PT)
Projects
Archived in project
Status: Done
Development

No branches or pull requests