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

Registry Preview window crashes when trying to open a file #25250

Closed
CodingWonders opened this issue Apr 6, 2023 · 15 comments
Closed

Registry Preview window crashes when trying to open a file #25250

CodingWonders opened this issue Apr 6, 2023 · 15 comments
Labels
Hot Fix Items we will product an out-of-band release for Issue-Bug Something isn't working Product-Registry Preview Refers to the Registry Preview PowerToy Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@CodingWonders
Copy link

Microsoft PowerToys version

0.69.0

Installation method

PowerToys auto-update

Running as admin

Yes

Area(s) with issue?

Registry Preview

Steps to reproduce

Open the Registry Preview window from PowerToys settings and click "Open file..."

Bug report log

✔️ Expected Behavior

I was expecting an "Open file" dialog to show up

❌ Actual Behavior

The window crashes, although PowerToys itself doesn't

Other Software

No response

@CodingWonders CodingWonders added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Apr 6, 2023
@stefansjfw stefansjfw added the Product-Registry Preview Refers to the Registry Preview PowerToy label Apr 6, 2023
@stefansjfw
Copy link
Collaborator

Hi, can you post /bugreport ? Also, does this happen every time ?

@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 Apr 6, 2023
@microsoft-github-policy-service
Copy link
Contributor

Hi there!

We need a bit more information to really debug this issue. Can you add a "Report Bug" zip file here? You right click on our system tray icon and just go to report bug. Then drag the zipfile from your desktop onto the GitHub comment box in this issue. Thanks!
Report Bug

@CodingWonders
Copy link
Author

The bug report is already provided in the "Bug report log" link. And yes, it happens every time for me

@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 Apr 6, 2023
@stefansjfw
Copy link
Collaborator

The bug report is already provided in the "Bug report log" link. And yes, it happens every time for me

Sorry, missed it. Thanks!

@stefansjfw
Copy link
Collaborator

@randyrants FYI

@stefansjfw
Copy link
Collaborator

@CodingWonders Does Registry Preview works fine if you right-click .reg file -> Preview? /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-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 labels Apr 6, 2023
@CodingWonders
Copy link
Author

Yes, it does

@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 Apr 6, 2023
@stefansjfw
Copy link
Collaborator

Ok. Thanks for the feedback. We'll look into it

@htcfreek
Copy link
Collaborator

htcfreek commented Apr 6, 2023

@stefansjfw
I can reproduce it. This is caused by running PT (Settings) and therefore Registry Preview as Administrator (elevated).

@The-MAZZTer
Copy link

The-MAZZTer commented Apr 6, 2023

@htcfreek I can confirm It crashes for me under those conditions as well.

If I run the Registry Preview EXE directly unelevated, Open File also works fine.

Right clicking a file and clicking Preview works fine as well.

One possible fix could be to have the launch button in settings run the preview tool unelevated to work around this issue. Not sure if a real fix would be trivial or not since the crash happens in Microsoft.ui.xaml.dll. Not to mention it is probably a good idea to unelevate any of the tools launched through Settings anyway, since the user is unlikely to expect them to all run elevated.

@randyrants
Copy link
Collaborator

I'll get on this straightaway - thanks for the easy to follow repro steps!

@PockerKID
Copy link

PockerKID commented Apr 7, 2023

After upgrading, i just launch it from what's news and it showed. But when i click to open a .reg file, it crashed. I found some .dmp files, hope useful.

PowerToys.RegistryPreview.exe.dmp.zip

PowerToysReport_2023-04-07-08-48-05.zip

@randyrants
Copy link
Collaborator

randyrants commented Apr 7, 2023

Indeed: the crash is a known issue with WinUI and calling this API while elevated, per microsoft/WindowsAppSDK#2504

I'll see about using one of their workarounds for now.

@PockerKID
Copy link

By the way, it works when i use right click to open a .reg file, after this, i can open another files in the preview window.

@sunskylab
Copy link

sunskylab commented Apr 11, 2023

I can confirm that the Registry Preview windows crashes when running elevated as Admin, but not only when trying to Open a file, but when pressing the Save file as button as well. Opening the Registry Editor does not result in a crash.

PowerToysReport_2023-04-11-16-38-36.zip

@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 12, 2023
@jaimecbernardo jaimecbernardo added this to To do in 0.70 Release via automation Apr 12, 2023
@jaimecbernardo jaimecbernardo moved this from To do to Done in 0.70 Release Apr 12, 2023
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 Product-Registry Preview Refers to the Registry Preview PowerToy Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
No open projects
Development

No branches or pull requests

9 participants