Skip to content

Menu sample sometimes "Render" call fails. #3738

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

Closed
1 of 2 tasks
Rosuavio opened this issue Feb 5, 2021 · 12 comments
Closed
1 of 2 tasks

Menu sample sometimes "Render" call fails. #3738

Rosuavio opened this issue Feb 5, 2021 · 12 comments
Assignees
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior controls 🎛️ in progress 🚧
Milestone

Comments

@Rosuavio
Copy link
Contributor

Rosuavio commented Feb 5, 2021

Describe the bug

When opening up the Menu sample the render call at Microsoft.Toolkit.Uwp.SampleApp\Pages\SampleController.xaml.cs 506 fails the first time and works after waiting and opening up the Menu sample a second time. The text that is being rendered is the same on the times that it fails as the times that it succeeds.

failed.txt

This error get logged.
Exception thrown: 'Windows.UI.Xaml.Markup.XamlParseException' in Microsoft.Toolkit.Uwp.SampleApp.exe WinRT information: Unknown parser error: Scanner 2148734242. [Line: 205 Position: 41]

Broke in the split controls merge.

  • Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:

Steps to Reproduce

  • Can this be reproduced in the Sample App? (Either in a sample as-is or with new XAML pasted in the editor.) If so, please provide custom XAML or steps to reproduce. If not, let us know why it can't be reproduced (e.g. more complex setup, environment, dependencies, etc...)

Steps to reproduce the behavior:

  1. Open Menu sample on sample app.
  2. Menu sample does not load.

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

NuGet Package(s): 

Package Version(s): 

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [ ] Insider Build (xxxxx)

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

Visual Studio 
- [ ] 2017 (version: )
- [ ] 2019 (version: ) 
- [ ] 2019 Preview (version: )

Additional context

Add any other context about the problem here.

@Rosuavio Rosuavio added the bug 🐛 An unexpected issue that highlights incorrect behavior label Feb 5, 2021
@ghost ghost added the needs triage 🔍 label Feb 5, 2021
@ghost
Copy link

ghost commented Feb 5, 2021

Hello RosarioPulella, 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 🙌

@Rosuavio Rosuavio changed the title Split Controls: Menu sample sometimes Render call fails. Split Controls: Menu sample sometimes "Render" call fails. Feb 5, 2021
@michael-hawker
Copy link
Member

Hmm, wonder if we missed updating something in the XAML. Very bizarre. Wonder if we try pulling the NuGet package and copying the sample XAML into an app if we'd see the same problem?

Does the app get taken down or does it just not work the first time?

@Rosuavio
Copy link
Contributor Author

When trying to make the sample code work in a project I would get this error 1>C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets(312,5): Xaml Internal Error error WMC9999: This Member 'Resources' has more than one item, use the Items property

Jumping to the error line did not help at all. But InteliSense highlighted <Style TargetType="MenuFlyoutItem"> and I had to move that whole block inside the ResourceDictionary and then it worked fine.

@Rosuavio
Copy link
Contributor Author

The same change in the sample app did not seem to fix it.

@Rosuavio
Copy link
Contributor Author

Does the app get taken down or does it just not work the first time?

The sample just does not render the first time.

@michael-hawker
Copy link
Member

Yeah, this is really weird. Fiddling with it, I can eventually get it to work with the same code that was there.

I noticed a similar issue in ListDetailsView with one of the Styles...

I feel like the only Sample App stuff that has changed was in #3648? But can't see how that'd be an issue here. We could try doing more comparisons between 6.1 and now. Though this really seems like some weird timing issue?

@michael-hawker
Copy link
Member

@RosarioPulella did you test in Release mode too without the Debugger attached or only in Debug w/ Debugger? Wondering if it behaves the same way or not?

@Rosuavio
Copy link
Contributor Author

Rosuavio commented Feb 12, 2021

So currently I am having issues building in release. But after some small changes to get it to build the menu sample does open up on the first try. I don't know how or why but not an issue in Release 🤔. I can still investigate the commits and see where it was introduced.

@Rosuavio Rosuavio changed the title Split Controls: Menu sample sometimes "Render" call fails. Menu sample sometimes "Render" call fails. Feb 12, 2021
@michael-hawker michael-hawker added the next preview ✈️ Label for marking what we want to include in the next preview release for developers to try. label Feb 16, 2021
@michael-hawker michael-hawker self-assigned this Feb 16, 2021
@michael-hawker michael-hawker removed their assignment Feb 25, 2021
@michael-hawker michael-hawker modified the milestones: 7.0, 7.1 Mar 11, 2021
@michael-hawker michael-hawker removed the next preview ✈️ Label for marking what we want to include in the next preview release for developers to try. label Mar 11, 2021
@michael-hawker
Copy link
Member

@RosarioPulella let me know later (low priority) if you can still reproduce. Final built app for 7.0 seems fine. So I'm not too worried about this?

@Rosuavio
Copy link
Contributor Author

Rosuavio commented Mar 16, 2021

I don't see this error on the released version either. But when I build the main branch ( 0ff1745 ) on Debug|Any CPU I still see the bug.

@michael-hawker
Copy link
Member

We think this is fixed with the update to WinUI 2.6.2, just need to re-validate.

@ghost ghost added the in progress 🚧 label Aug 31, 2021
@Rosuavio
Copy link
Contributor Author

Tested, no longer an issue.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior controls 🎛️ in progress 🚧
Projects
None yet
Development

No branches or pull requests

2 participants