question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Preview 4] AV(Null) in SystemNavigationManager.GetForCurrentView()

See original GitHub issue

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:

  1. Create a blank WinUI 3 desktop app for Preview 4. Verifies that blank app works.
  2. Install Microsoft.Toolkit.Uwp.UI.Controls 8.0.0-preview4 from their feed.
  3. Add a blank MasterDetailsView to main window.
  4. Exception thrown when the 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:

UWP Win32
Yes
Windows 10 version Saw the problem?
Insider Build (xxxxx)
October 2020 Update (19042) Yes
May 2020 Update (19041)
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 Stack trace:

 	CoreUIComponents.dll!Microsoft::WRL::ComPtr<Windows::UI::Core::ICoreWindow>::As<ICoreWindowInterop>()	未知
 	CoreUIComponents.dll!Windows::UI::Core::SystemNavigationManagerStatics::GetForCurrentView()	未知
 	[托管到本机的转换]	
 	Microsoft.Windows.SDK.NET.dll!ABI.Windows.UI.Core.ISystemNavigationManagerStatics.Windows.UI.Core.ISystemNavigationManagerStatics.GetForCurrentView()	未知
 	Microsoft.Windows.SDK.NET.dll!Windows.UI.Core.SystemNavigationManager.GetForCurrentView()	未知
 	Microsoft.Toolkit.Uwp.UI.Controls.dll!Microsoft.Toolkit.Uwp.UI.Controls.MasterDetailsView.OnLoaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)	未知

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
huoyaoyuancommented, Feb 13, 2021

This is currently blocking MasterDetailsView totally.

0reactions
huoyaoyuancommented, Nov 3, 2021

Hello, the same issue is blocking ListDetailView (renamed from MasterDetailsView) again, in WinUI/WAS 1.0.0-preview3. @michael-hawker @Austin-Lamb

Read more comments on GitHub >

github_iconTop Results From Across the Web

SystemNavigationManager Class (Windows.UI.Core)
Gets or sets a value that indicates whether a back button is shown in the system UI. Methods. GetForCurrentView(). Returns the SystemNavigationManager object ......
Read more >
SystemNavigationManager.GetForCurrentView Method
Returns the SystemNavigationManager object associated with the current window.
Read more >
MDN 1015D2 | PDF | Microsoft Visual Studio | Windows 10
4 Venture, Suite 150, Irvine, CA 92618. Corporate Office (weekdays, 8:30 a.m. 5:30 p.m. PT) Telephone 818-814-5200; Fax 818-734-1522 9201 Oakdale Avenue ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found