Skip to content
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

[BUG] Lottie crashes when starting in Windows #289

Open
eduardoagr opened this issue Oct 10, 2024 · 1 comment
Open

[BUG] Lottie crashes when starting in Windows #289

eduardoagr opened this issue Oct 10, 2024 · 1 comment
Labels

Comments

@eduardoagr
Copy link

Description

When you start an application, with a lottie file, this happens

image

Code

<Grid RowDefinitions="Auto,*,*">
    <Image
        Margin="40"
        Aspect="Center"
        Source="metro_wind_200.png"
        VerticalOptions="Start" />
    <skia:SKLottieView
        Grid.Row="1"
        HeightRequest="300"
        HorizontalOptions="Center"
        Source="metrowind.json"
        VerticalOptions="Start"
        WidthRequest="400">
        <skia:SKLottieView.Behaviors>
            <mct:EventToCommandBehavior
                Command="{Binding GotoHomeCommand}"
                EventName="AnimationCompleted" />
        </skia:SKLottieView.Behaviors>
    </skia:SKLottieView>
    <Label
        Grid.Row="2"
        FontAttributes="Bold"
        FontSize="18"
        HorizontalOptions="Center"
        Text="{x:Static rex:AppResource.Energy}"
        VerticalOptions="Start" />
        public static MauiApp CreateMauiApp() {
            var builder = MauiApp.CreateBuilder();
            builder
                .UseMauiApp<App>()
#if WINDOWS
                .UseMauiCommunityToolkitMaps("xxx")
#elif ANDROID || IOS
           .UseMauiMaps()
#endif
                .UseSkiaSharp()

Expected Behavior

The app would start normally

Actual Behavior

The app crashes, and tels me this

image

Basic Information

  • Version with issue: latest
  • Last known good version: latest
  • IDE: Visual Studio 2022 17.11.5
  • Platform Target Frameworks:
    • Windows10.0.19041.0
  • Target Devices: Windows 11
    • Device Windows 11
Detailed IDE/OS information (click to expand)

Net 8
Maui 8.0.1
Edition	Windows 11 Education
Version	23H2
Installed on	‎10/‎24/‎2022
OS build	22631.4317
Experience	Windows Feature Experience Pack 1000.22700.1041.0


Screenshots

image

Reproduction Link

(https://github.com/eduardoagr/PopUpError)

@eduardoagr eduardoagr added the bug label Oct 10, 2024
@superwilly1
Copy link

I have the same issue, since updating to Visual Studio 17.11.5 (and .NET 8.0.10, SDK 8.0.403).
In the output window I see this exception:

Exception thrown: 'System.NotSupportedException' in WinRT.Runtime.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in System.Private.CoreLib.dll

After downgrading Visual Studio (and .NET), it works again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants