TemplateStudio icon indicating copy to clipboard operation
TemplateStudio copied to clipboard

Switching between settings and main page causes crash

Open vfib opened this issue 2 years ago • 6 comments
trafficstars

Describe the bug

If I use ThemeResource styles (e.g. CardStrokeColorDefaultBrush) on a control in the settingspage, after some switches between the empty main page and the settings, the app crashes with

(0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.

For stacktrace see add context

To Reproduce

  1. Create a new sln with Template Studio, adding a navigation pane, settings page and a blank main page
  2. Add

Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"

to both Theme and About-Stackpanels in SettingsPage.xaml 3. Add

BorderThickness="1" BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"

to both Theme and About-Stackpanels in SettingsPage.xaml 4. Leave everything else unaltered 4. Switch between settings and main page, if it doesnt crash restart and try again, sometimes under certain and unknown circumstances it doesnt happen

Additional context

Stacktrace Screenshot 2023-05-13 162907

Applies to the following platforms:

  • [X] WinUI
  • [ ] WPF
  • [ ] UWP

About your setup

  • Visual Studio Version: 17.5.5
  • Template Studio Wizard Version: 5.3
  • Windows Build: 10.0.22621.1702
  • App SDK: 1.3.230502000

Hoping this is the right way to report this Best regards

vfib avatar May 13 '23 14:05 vfib

I can confirm this bug. TS Version: 5.2 and 5.3 Windows Build: 10.0.19045

Piguelo avatar May 18 '23 19:05 Piguelo

i will check it out. thanks for finding out

pratikone avatar May 24 '23 00:05 pratikone

same problem here

mohamed2991 avatar Jun 26 '23 14:06 mohamed2991

any news about this issue?

Piguelo avatar Aug 29 '23 00:08 Piguelo

Guys, try updating Template Studio Wizard to version 5.5 I had this bug but after updating to 5.5 and creating new project, it looks ok.

upd: my bad, it still crashes after changing theme(light/dark) and then jumping between settings and other pages. Visual Studio Version: 17.9.6 App SDK: 1.5 Windows Build: Windows 11 Pro 23H2 22631.3447

m0ty avatar Apr 10 '24 12:04 m0ty

Any news to this, @pratikone? WinUi 1.5.3

vfib avatar May 04 '24 12:05 vfib