CommunityToolkit / Microsoft.Toolkit.Win32

ARCHIVE - This repository contained XAML Islands wrapper controls and tooling for XAML Islands with WinUI 2, see readme for more info about XAML Islands with WinUI 3 and the WindowsAppSDK.
https://aka.ms/windowsappsdk
Other
384 stars 89 forks source link

App (WPF/.NetCore 5.0.0) crashing with ItemsRepeater and UniformGridLayout #324

Closed mobilewares closed 2 years ago

mobilewares commented 3 years ago

Describe the bug

WPF App crashes when using ItemsRepeater that has a UniformGridLayout Layout & number of items is being vertically scrolled by more than 2-3(?) screens worth (not 100% clear on exact quantity of items or pages that causes this). If number of items only use <1-2 pages (minimal vertical scrolling) then App works without crashing. ItemsRepeater is using DataTemplate with some binding (CommunityToolkit.MVVM).

Note - if not using the UniformGridLayout (just single column of vertical scrolling items within ItemsRepeater/ScrollViewer host) then this problem does not happen - seems to be when the UniformGridLayout is used only.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Use a child UniformGridLayout (ie MinItemWidth/MinItemHeight of 128) inside an ItemsRepeater that is wrapped by a ScrollViewer.
  2. Assign ItemsSource (via MVVM) which has (for example) 200-300 items.
  3. Vertically scroll up and down through the resulting items
  4. App will lock up for 1-2 minutes and then eventually crash/throw exception in Main App (without any meaningful information).

Expected behavior

App does not crash

Environment


NuGet Package(s): 
CommunityToolkit.WinUI.Controls
Microsoft.ProjectReunion.WinUI

Package Version(s): 
CommunityToolkit.WinUI.Controls v7.0.3
Microsoft.ProjectReunion.WinUI v0.8.1

Project .NET Version:
- [ ] .NET Core 5.0.0

Windows 10 Build Number:
Windows 21H1 (19043.1055)

App min and target version:
- [ Y] October 2018 Update (17763)

Device form factor:
- [Y ] Desktop

Visual Studio 
- [ Y] 2019 (version: 16.10.3) 
ghost commented 3 years ago

Hello mobilewares, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

michael-hawker commented 3 years ago

@mobilewares this repo is about XAML Islands. You're calling out a WPF app, but then saying you're using WinUI 3 those are mutually exclusive things.

Can you clarify your scenario?

FYI @azchohfi as I suspect it's just a pure WinUI 3 app?

azchohfi commented 3 years ago

Looks like it.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

michael-hawker commented 2 years ago

@mobilewares still assuming you mean WinUI 3 and not WPF, they're different technologies. If you have a small repro with just ItemsRepeater and UniformGridLayout, these aren't toolkit components. Probably best to file an issue on the WinUI repo here: https://aka.ms/winuigithub