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

WinUI 3 & Reunion 0.5 error: Microsoft C++ exception: winrt::hresult_error at memory location 0x..... when NavigationView is using #4806

Closed
LeftTwixWand opened this issue Apr 13, 2021 · 12 comments
Labels
area-NavigationView NavView control product-winui3 WinUI 3 issues team-Controls Issue for the Controls team v0.5 Issues introduced in the Project Reunion 0.5 prerelease

Comments

@LeftTwixWand
Copy link
Contributor

Describe the bug:
Impossible to use NavigationView component in WinUI 3 and Project Reunion 0.5.

Steps to reproduce the bug:
All you need to do for the bug reproducing, is to add NavigationView item to your XAML code:

  <NavigationView/>

Screenshots:
image

Version Info

NuGet package version:
WinUI 3 - Project Reunion 0.5

Windows app type:

UWP Win32
No Yes
Windows 10 version Saw the problem?
Insider Build (xxxxx)
October 2020 Update (19042) Yes
May 2020 Update (19041) Yes
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context
I suppose, It's the same error, that describes in this issue: #4790

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Apr 13, 2021
@Noemata
Copy link

Noemata commented Apr 13, 2021

@LeftTwixWand , same. Looks like you narrowed it down further. When I singled stepped through initialization, I was able to get to a running state, so I assumed it was a bit more complicated and related to a background thread. Regardless, NavigationView is presently unusable with WinUI.

@LeftTwixWand
Copy link
Contributor Author

LeftTwixWand commented Apr 13, 2021

@Noemata, unfortunately, WinUI 3 is not open source yet, and we can't check what is happening inside(
Even if I'll get a source code of components from the generic.xaml file, I can't see the C++ code with a logic.
So - we just have to wait for a fix from the Microsoft guys.

@Noemata
Copy link

Noemata commented Apr 13, 2021

@LeftTwixWand , indeed, we must wait. Hopefully, Microsoft will change its definition of production ready. This release is a curious kind of production grade.

@huoyaoyuan
Copy link

When the exception caught by VS, press F5 and continue works for me.

@StephenLPeters StephenLPeters added v0.5 Issues introduced in the Project Reunion 0.5 prerelease team-Controls Issue for the Controls team area-NavigationView NavView control product-winui3 WinUI 3 issues and removed needs-triage Issue needs to be triaged by the area owners labels Apr 13, 2021
@StephenLPeters
Copy link
Contributor

@ojhad FYI

@Herdubreid
Copy link

There is a simple workaround for this, as explained in #4496 (comment)

@LeftTwixWand
Copy link
Contributor Author

When the exception caught by VS, press F5 and continue works for me.

So strange. In one project I can just skip the error, and it will work. But in another, any manipulations with a NavigationView also will throw an exception: Access violation reading location

@codendone codendone added fixed-in-Reunion0.8 fixed-internally This bug has been fixed, and the fix will be shipped in the next version of WinUI 3. labels Apr 24, 2021
@anawishnoff
Copy link
Contributor

Hi @LeftTwixWand, you should see a fix for this bug in the upcoming WinUI 3/Project Reunion 0.8 Preview, which you can expect soon. Thanks for filing this!

@LeftTwixWand
Copy link
Contributor Author

Hi @LeftTwixWand, you should see a fix for this bug in the upcoming WinUI 3/Project Reunion 0.8 Preview, which you can expect soon. Thanks for filing this!

Thanks for everyone, who making such cool technologies)

@DRAirey1
Copy link

DRAirey1 commented Sep 8, 2022

What is the status of this? I'm running into this problem without Reunion. Just the navigation control. As one of the comments noted, in one configuration (using HTTP to talk to a remove server), there is no error. In another configuration (using HTTP to talk to a local server), I get the error. You can't just step through it, it's a real exception. This is so deep in the WinUI code that there's no chance of reproducing it. When I build on a Windows 2019 Server, no error. When I build on a VM with Windows 11, no error. When I build on a laptop with all the other normal desktop connections and device, I get the error.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Sep 8, 2022
@ranjeshj
Copy link
Contributor

@DRAirey1 how are you using WinUI without Reunion? Can you provide a repro/details. perhaps you are not hitting the same issue.

@ghost ghost removed the needs-triage Issue needs to be triaged by the area owners label Sep 16, 2022
@DRAirey1
Copy link

DRAirey1 commented Sep 16, 2022

@DRAirey1 how are you using WinUI without Reunion?

I just created a new project from the WinUI templates in Visual Studio 2022.

Can you provide a repro/details. perhaps you are not hitting the same issue.

No. I can't repro. It happens randomly and the variables include using MSAL, different releases of the SDK, debug/release build, etc.

I can tell you that it's related to the BreadcrumbBar. The problem occurred when navigating to a page. The crash occurred while adding that view model to the ObservableCollection<ViewModel> that is bound to the Items Property of the BreadcrumbBar. When I replace the WinUI BreadcrumbBar with a custom control, the problem disappeared.

The problem occurred deep in the WinUI code with an error identical to the OP.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Sep 16, 2022
@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Mar 13, 2023
@bpulliam bpulliam removed the fixed-internally This bug has been fixed, and the fix will be shipped in the next version of WinUI 3. label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NavigationView NavView control product-winui3 WinUI 3 issues team-Controls Issue for the Controls team v0.5 Issues introduced in the Project Reunion 0.5 prerelease
Projects
None yet
Development

No branches or pull requests

10 participants