-
Notifications
You must be signed in to change notification settings - Fork 705
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
Crash when referencing resource dictionary with styles in WinUI 3 Preview 2 #3371
Comments
@chingucoding It sounds like you suspect this has to do with specific resource dictionary references. Do you know when this started to reproduce for you? (as in which bit of markup triggered it). Do you have the full stack trace? |
Just ran the app again and now I am able to view the exception message (not sure why now):
This error message sounds familiar, is this a know bug or did I make a mistake here? The crash happens when I am trying to reference the resource dictionary. Commenting out the resource dictionary reference in the "Library1/Controls.xaml" file "fixes" the issue, however it does not include the resource dictionary in the merged dictionary. Here is the stacktrace (albeit not a very helpful one):
|
Sorry for the gap in response, @chingucoding. I did check with someone to see if this was expected to be up and working on WinUI3 and it is, although there could be bugs. If you're still hitting this their recommendation was as follows:
As in try this on preview 3 and get the callstack at the point of failure, not in the unhandled state. |
Unfortunately, this still repros with preview 3. The issue is that the app crashes almost immediately; MainPage.InitializeComponent does not even get called. So beside the unhandled exception stack trace, there isn't much I can provide here I'm afraid. |
This issue also repros with WinUI 3 Desktop in WASDK 1.0. Using the |
Unfortunatly, for me, this workaround isn't working. |
Same problem 2.5 years later. Same project configuration, same error msg. Using lib name does not resolve the issue:
dotnet 6 |
@chingucoding I know it's been several years since you opened this issue, but could you try the repro again with the latest WinAppSDK 1.3 release and see if it still crashes? I recreated your repro app as a WinUI Desktop project (since we no longer support WinUI in UWP) and was unable to trigger the crash myself. I'm open to the possibility that I made a mistake somewhere along the way but we did make a change in |
Thanks for getting back to this @evelynwu-msft! This doesn't seem to repro anymore using WASDK 1.1, closing this issue as it is fixed. |
Describe the bug
Run the attached project. The app just crashes, opening the exception times out.
WinUI3 LibraryCrash.zip
Steps to reproduce the bug
Steps to reproduce the behavior:
Controls.xaml
andMyControl.xaml
MyControl.xaml
inControls.xaml
as resource dictionarylibrary/Controls.xaml
from a WinUI 3 UWP appExpected behavior
The app shouldn't crash.
Screenshots
Version Info
NuGet package version:
WinUI 3 Preview 2
Windows app type:
Additional context
This app works in UWP with WinUI 2.
The text was updated successfully, but these errors were encountered: