Immediate crash on startup with 4.4.0-sr1 on UWP.
This is due to the changes made in #8938.
The app should not crash.
The app crashes immediately on startup with the following exception:
System.InvalidCastException: 'Unable to cast object of type 'System.Attribute[]' to type 'Xamarin.Forms.HandlerAttribute[]'.'
@samhouts @davidortinau This is a critical issue and results in an _immediate_ crash on startup.
There is no way to mitigate this crash with the release NuGet package.
@velocitysystems Thanks! We've unlisted the update and we'll republish without this exception.
This is really weird, if I build Xamarin.Forms and run the Control Gallery locally this works:
Array covariance should work, this is weird...
@samhouts don't close the issue until the fix is merged in 4.4 and released on nuget. I also ran into the issue
This issue should be reopened as despite it being unlisted, it is still affecting any project I have that uses a wildcard to load the latest minor version of Xamarin.Forms. Even when the cache is explicitly cleared, 4.4.0.991440 is being downloaded from NuGet, resulting in the observed crash. A new version is needed to avoid this behavior.
@samhouts ok, I see it is merged, can we get a 4.4 nightly to test it?
It would be also better to create new labels ("fixed in codebase", "pending release", "released in version x.y.z" similar to VS dev community) and add them and close the issue only when fix is released and at this stage change status to closed and add released label
@MagicAndre1981 SR2 should be on its way to NuGet within the next hour.
Thanks for the suggestion about the labels. We'll take it under consideration. :)
@MagicAndre1981 SR2 should be on its way to NuGet within the next hour.
Thanks for the suggestion about the labels. We'll take it under consideration. :)
ok, the SR2 works now. And please add the new labels. To see which fix is in which release is extremely complicated.
I've just updated our project to 4.4.0-sr2 and getting a crash on launch when the app comes from the proper VSTS build. Local debug builds seem to work fine, so a bit puzzling
I've just updated our project to 4.4.0-sr2 and getting a crash on launch when the app comes from the proper VSTS build. Local debug builds seem to work fine, so a bit puzzling
@MitchBomcanhao I'm glad it's not just me that's puzzled!
Which Visual Studio versions do you use? @MitchBomcanhao @jonathanpeppers
I use Visual Studio 2017 and here I had the issue with SR1 and the SR2 works fine and the app runs fine.
I'm on 2019 (16.4.2) for both local machine and the remote build agent.
Updating to SR2 resolved the issue for us.
No problem with debug or release builds from our CI pipeline for iOS, Droid or UWP.
I've noticed that a similar issue with Xamarin Tizen #9129 which mentions SkiaSharp, and we are using SkiaSharp 1.68.1.1 on our Xamarin app, so might be related.
The UWP app also crashes when I run locally on a Release configuration. Debug config works just fine.
Will attempt to make a repro project...
Most helpful comment
@samhouts don't close the issue until the fix is merged in 4.4 and released on nuget. I also ran into the issue