Open tipa opened 4 years ago
@tipa can you confirm that you followed the getting started steps here: https://docs.microsoft.com/en-us/windows/apps/winui/winui2/getting-started and are still seeing the issue? if so can you please attach a repro app so we can take a look at the specific issue?
Yes I followed that guide. I can only see this crash being reported for 2 devices (out of a reported install base of currently ~2.000) so I don't know how this issue could be easily reproduced on one of our machines. I am using the library in a UWP app if that helps...
Are the 2 devices the only ones that are on RS4/RS5? Are there users on RS4/5 that aren't hitting this crash?
There are other RS4 and RS5 devices running my app but it only crashes on those 2 specific ones
If this crash is happening in just a handful of RS4/RS5 machines it makes me think there is some issue with the package installation. @kmahone was investigating a similar issue in our build/test pipelines where once in while a machine would end up in a weird state in down-level operating systems.
The package itself must be getting installed, since M.U.X.dll is getting loaded (otherwise we wouldn't see this error).
For some reason, the process is failing to load resources from the package.
Looking at the message again. Perhaps the app is failing somewhere and this is the message when trying to resolve some error text message ? If you happen to have a repro, can you enable native exceptions and get a callstack where it is thrown ?
I cannot reproduce this locally on my machines unfortunately. If it somehow helps, the app is available to download in the Microsoft Store. I can also now see 2 RS5 devices for which the app crashes (out of a total of 454 RS5 devices).
I can now see other/additional errors
10.0.19041:
Windows.UI.Xaml.Markup.XamlParseException: Не удалось найти текст, связанный с этим кодом ошибки. Cannot create instance of type 'Microsoft.UI.Xaml.Controls.XamlControlsResources' [Line: 0 Position: 0]
10.0.17763:
Windows.UI.Xaml.Markup.XamlParseException: The text associated with this error code could not be found. Cannot create instance of type 'Microsoft.UI.Xaml.Controls.XamlControlsResources' [Line: 0 Position: 0]
10.0.17134:
Windows.UI.Xaml.LayoutCycleException: Cannot find a Resource with the Name/Key CalendarDatePickerTopHeaderMargin Cannot find a Resource with the Name/Key CalendarDatePickerTopHeaderMargin
Interesting. So I think I understand the issue with 'CalendarDatePickerTopHeaderMargin'. However, that is only going to be hit on RS4 and below. I think that is a different issue to the Cannot locate resource from 'ms-appx://Microsoft.UI.Xaml.2.4/Microsoft.UI.Xaml/Themes/rs4_themeresources.xaml
problem at the top of this thread.
Do you have access to the crash dumps? Or just the error message?
I just got these crash reports from AppCenter, never was able to reproduce this on my devices... :/
I've filed a separate issue for the 'CalendarDatePickerTopHeaderMargin' issue:
Fixing this in WinUI should be pretty straight forward.
If you want to work-around this issue in your app until we have a release out containing the fix, it should be easy. Just add this Xaml to your App.xaml:
<Thickness x:Key="CalendarDatePickerTopHeaderMargin">0,0,0,4</Thickness>
The cause of the other issues is still unclear.
In AppCenter, do you have the ability to see the full call stack of the crash? Or do you just see the error message? (I've personally never used AppCenter).
Thanks! The stack traces unfortunately seem to not contain a lot of information:
Also found yet another crash report:
Windows.UI.Xaml.Markup.XamlParseException: Não foi possível encontrar o texto associado a este código de erro. Cannot create instance of type 'Microsoft.Graphics.Canvas.UI.Xaml.CanvasControl' [Line: 0 Position: 0]
@kmahone The app I work on also logs crashes in several OS Versions (10.0.17763, 10.0.18363, 10.0.19041, and more) with no other details and no local repro.
errorCode | exceptionType | exceptionMessage | exceptionStackTrace |
---|---|---|---|
-2144665590 | XamlParseException | The text associated with this error code could not be found. Cannot create instance of type 'Microsoft.UI.Xaml.Controls.XamlControlsResources' [Line: 0 Position: 0] |
After all those months this crash is still visible in my AppCenter crash reports.
Windows.UI.Xaml.Markup.XamlParseException: De tekst die bij deze foutcode hoort, kan niet worden gevonden. Cannot create instance of type 'Microsoft.UI.Xaml.Controls.XamlControlsResources' [Line: 0 Position: 0]
@RealTommyKlein FYI
Will this ever be fixed? 🤔 My AppCenter crash reporting is flooded with these crashes
Will this ever be fixed? 🤔 My AppCenter crash reporting is flooded with these crashes
Mitigations and auto-healing logic were added to the package deployment stack in early 2021 and backported all the way to 10.0.18362
that should help machines recover from this bad state. Unfortunately, as you've probably surmised, this doesn't fully prevent machines from entering this bad state in the first place so it's likely that you'll continue to see AppCenter crash reports of this nature, just hopefully not from the same devices if they're on 18362 or later. Work is ongoing to investigate and fix all potential root causes but progress has been slow because this is a complex area and reproducing the issue is difficult. I'm sorry I don't have better news for you right now but I wanted to provided you with an update.
@evelynwu-msft Thanks for the update. I still see devices with recent Windows installations (e.g. 10.0.19043) which crash multiple times (50times and more), so they don't seem to auto-recover from this bad state.
Bumping this (see https://github.com/microsoft/microsoft-ui-xaml/discussions/8638).
Describe the bug App crashes on some users machines, crash reports coming from AppCenter:
One device running 10.0.17134
Windows.UI.Xaml.Markup.XamlParseException: The text associated with this error code could not be found. Cannot locate resource from 'ms-appx://Microsoft.UI.Xaml.2.4/Microsoft.UI.Xaml/Themes/rs4_themeresources.xaml [Line: 0 Position: 0]
Another one running 10.0.1776:
Windows.UI.Xaml.Markup.XamlParseException: The text associated with this error code could not be found. Cannot locate resource from 'ms-appx://Microsoft.UI.Xaml.2.4/Microsoft.UI.Xaml/Themes/rs5_themeresources.xaml'. [Line: 0 Position: 0]
I am only using
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
in my App.xml andmuxc:NavigationView
from the WinUI libraryNuGet package version: Microsoft.UI.Xaml 2.4.0