Skip to content
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

Title bar API causes apps to crash on Windows 10 (less often on Windows 11) #10199

Open
wbokkers opened this issue Nov 25, 2024 · 3 comments
Open
Labels
area-TitleBar Issues related to custom window title bars. bug Something isn't working

Comments

@wbokkers
Copy link

wbokkers commented Nov 25, 2024

Describe the bug

On Windows App SDK 1.5.8 (and possibly on 1.6 as well) users experience crashes in (child) windows using title bar customization.

Image

Image

Steps to reproduce the bug

  1. I have this code in the constructor of a Window:
      if (AppWindowTitleBar.IsCustomizationSupported())
      {
              _appWindow.TitleBar.ExtendsContentIntoTitleBar = true;
              _appWindow.TitleBar.IconShowOptions = IconShowOptions.HideIconAndSystemMenu;
      }
  2. User opens (closes?) this Window
  3. The app crashes on Windows 10.0.10945.5131 (But sometimes also on newer Windows 11 versions)

Expected behavior

No crash

NuGet package version

WinUI 3 - Windows App SDK 1.5.8

Windows version

Windows 10.0.19045.5131 (frequent). On Windows 11 less often.

@wbokkers wbokkers added the bug Something isn't working label Nov 25, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Nov 25, 2024
@wbokkers wbokkers changed the title Title bar API causes apps to crash on Windows 10 Title bar API causes apps to crash on Windows 10 (less often on Windows 11) Nov 26, 2024
@wbokkers
Copy link
Author

wbokkers commented Dec 3, 2024

I can reproduce one situation on my end:

Enqueue method to show the window with the adapted titlebar
Immediately afterwards enqueue method to close the window (window.Close)
Immediately afterwards enqueue method for showing the window again

This will often result in this crash:

Image

@karkarl karkarl added area-TitleBar Issues related to custom window title bars. and removed needs-triage Issue needs to be triaged by the area owners labels Dec 13, 2024
@karkarl
Copy link
Contributor

karkarl commented Dec 13, 2024

I have also been reproing this issue, and have started a thread with the AppWindow folks on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TitleBar Issues related to custom window title bars. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants