-
Notifications
You must be signed in to change notification settings - Fork 692
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
[Preview 4] AV(Null) in SystemNavigationManager.GetForCurrentView() #4174
Comments
For preview 3, the same exception is thrown before window shown, and successes after shown. If the API is not meant to be called in WinUI desktop, please tell WCTK to remove the call to it. |
@Austin-Lamb FYI, @michael-hawker with Winui3 preview 4 GetForCurrentView is no long valid to call on Desktop applications. |
Can the API errors more gracefully? |
@StephenLPeters thanks, yeah I thought we had replaced all those already. @azchohfi did we miss this one in the past, or is this a new case for Preview 4 that we didn't catch? @huoyaoyuan thanks for reporting an issue, we'll take a look. We've been a bit focused on clamping down our main 7.0 release, but we'll be doing a bit more vetting of the WinUI 3 versions of controls in March. We have a lot of controls, and we haven't onboarded everything into our integrated tests yet, and are still working on getting those to run on top of WinUI 3 as well. |
This is currently blocking |
Unfortunately I'm not sure if there's anything we can do to make them return null or some such. A way to anticipate it is to check the Window.Current property, which will be null in a Desktop app, which is where the GetForCurrentView APIs won't work. |
Hello, I'm Martin from Windows Template Studio Team. I'm updating WinUI Templates to WinUI Preview 4 and I'm also having the same Issue
Adding minimal repro app. I hope it helps 👍 |
I believe SystemNavigationManager only raises its BackRequested event for UWP apps. So best to just ignore this (don't try to retrieve it) on Desktop. |
New case in preview4, which we missed for this release. |
Hello, the same issue is blocking |
Describe the bug
Access violation to location 0x00000000. This should be a null pointer exception.
Steps to reproduce the bug
Steps to reproduce the behavior:
MasterDetailsView
to main window.MasterDetailsView
is loaded.Expected behavior
Shows without exception.
Version Info
NuGet package version:
Microsoft.WinUI 3.0.0-preview4.210210.4
Not seeing in preview3 or preview2.
Windows app type:
Additional context
Stack trace:
WCTK side may be updated to guard for using it. But WinUI side should gracefully return null or something other than crash with null AV.
The text was updated successfully, but these errors were encountered: