Template10 icon indicating copy to clipboard operation
Template10 copied to clipboard

"CommandParameter is not set" error on "HamburgerMenu_KeyDown"

Open FahadMustafa opened this issue 10 years ago • 2 comments

I have an app in the store using 1.1.11. I am seeing a System.NullReferenceException a few times:

`Exception Type: System.NullReferenceException Crashed Thread: 2

Application Specific Information: CommandParameter is not set

Exception Stack: Template10.Controls.HamburgerMenu.ExecuteNav(Controls.HamburgerButtonInfo commandInfo) Template10.Mvvm.DelegateCommand<Template10.Controls.HamburgerButtonInfo>.Execute(Object p) Template10.Controls.HamburgerMenu.HamburgerMenu_KeyDown(Object sender, UI.Xaml.Input.KeyRoutedEventArgs e) Windows.UI.Xaml.RoutedEventHandler.Invoke(Object sender, UI.Xaml.RoutedEventArgs e)`

By looking the the HamurgerMenu.xaml.cs source code I can see that its possible for the parameter passed into "ExecuteNav" to be null.

https://github.com/Windows-XAML/Template10/blob/master/Template10%20(Library)/Controls/HamburgerMenu.xaml.cs#L121

https://github.com/Windows-XAML/Template10/blob/master/Template10%20(Library)/Controls/HamburgerMenu.xaml.cs#L257

I'm not sure why the value would be null in the first place. I have noticed from my logs that the devices affected are only ASUS PCs.

In case of null can we not execute the command ?

FahadMustafa avatar Jun 07 '16 05:06 FahadMustafa

The fix was merged, is the issue still there?

schuettecarsten avatar Jun 12 '16 18:06 schuettecarsten

@schuettecarsten I cannot verify the fix directly since I could not reproduce, found the issue through telemetry from a few production users. Will have to wait until I deploy a new version of the app with the updated fix.

FahadMustafa avatar Jun 13 '16 22:06 FahadMustafa