WindowsCommunityToolkit icon indicating copy to clipboard operation
WindowsCommunityToolkit copied to clipboard

Application crashes when AdaptiveGridView is used inside HamburgerMenu

Open avknaidu opened this issue 8 years ago • 8 comments

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request <!-- Please file a UserVoice request and include the link below https://wpdev.uservoice.com/forums/110705-universal-windows-platform/category/193402-uwp-community-toolkit -->
[ ] Sample app request
[ ] Documentation issue or request
[ ] Question of Support request => Please do not submit support request here, instead see https://github.com/Microsoft/UWPCommunityToolkit/blob/master/contributing.md#question

Current behavior

When using AdaptiveGridView Inside a Hamburger Menu, Application crashes.

Minimal reproduction of the problem with instructions

Sample Project Rep with issue

Environment

Nuget Package(s): 
Microsoft.Toolkit.UWP.UI.Controls
Package Version(s): 
2.1.1
Windows 10 Build Number:
- [ ] Anniversary Update (14393) 
- [ ] Creators Update (15063)
- [x] Fall Creators Update (16299)
- [ ] Insider Build (xxxxx)

App min and target version:
- [x] Anniversary Update (14393) 
- [ ] Creators Update (15063)
- [ ] Fall Creators Update (16299)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Mobile
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 15.3
- [x] 2017 15.4

StackTrace

System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
   at Windows.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)

avknaidu avatar Feb 15 '18 17:02 avknaidu

Is there an error/callstack for the issue?

skendrot avatar Feb 15 '18 17:02 skendrot

@skendrot updated issue with StackTrace

avknaidu avatar Feb 15 '18 17:02 avknaidu

Thanks. I'll try to take a look at the issue

skendrot avatar Feb 15 '18 18:02 skendrot

If you find a fix first, we welcome PRs!

skendrot avatar Feb 15 '18 18:02 skendrot

@avknaidu are you sure your DataTemplate is valid? This caused a similar issue for me. Try to replace the AdaptiveGridView with an GridView to test your DataTemplate

tipa avatar Feb 17 '18 11:02 tipa

@tipa. When i change the AdaptiveGridView to GridView, i get a Layout cycle detected bug.

avknaidu avatar Feb 18 '18 00:02 avknaidu

@tipa. When i change the AdaptiveGridView to GridView, i get a Layout cycle detected bug.

avknaidu avatar Feb 18 '18 00:02 avknaidu

The issue is with your BorderBrush. You have it set to 10 which is not a valid brush. Change the value to a valid brush and it works fine

skendrot avatar Feb 21 '18 16:02 skendrot