Skip to content

Critical crash in WinUI with attached properties in style. #6388

Open

Description

Describe the bug

You will have unexpected crash in WinUI 3 If you have a style with attached property.

Steps to reproduce the bug

  1. Create a template (buttons in my case) using a few attached properties.
  2. Use the template in the second assembly (in the button where we call this crash).
  3. Create a style in the second assembly, where we assign any attached property (if we assign all attached properties, the bug is not reproduced.). It is enough to create the style. You do not have to use it.

If we click the button - we have crash.

Same in my native language ->

  1. Создаем шаблон (кнопки в моем случае) с использованием нескольких присоединенных свойств.
  2. Используем шаблон во второй сборке (в кнопке по которой упадем).
  3. Создаем стиль во второй сборке, где присваиваем любое присоединенное свойство (если присвоить все присоединенные свойства - баг не воспроизводится.). Сам стиль можно не использовать. Достаточно его создать.

По нажатию на кнопку - падаем.

Expected behavior

No crash.

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.0 (If you're seeing your issue in older previews of WinUI 3, please try this release)

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

May 2021 Update (19043)

Additional context

See attached project

TestForMS.zip

@gabbybilka Looks like you have critical crash in WinUI. I added a simple project. Could somebody take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Crashwhenever user reports a crash or app freezearea-CommandingAppBar, UICommand, MVVM, etcbugSomething isn't workingproduct-winui3WinUI 3 issuesteam-ControlsIssue for the Controls team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions