quicoli/LottieSharp

Missing rotation leads to "Unable to parse composition" (Telegram Sticker)

Closed this issue · 0 comments

Describe the bug
I am trying to use this library to display telegram stickers, but I always get a NullReferenceException ("Unable to parse composition"). So, I downloaded this repo and I was able to reproduce this issue in the Sample-Project.
Unzipping my tgs-files also works properly, I've also tested the result json in https://lottiefiles.com/tools/json-editor and it's working.

Sample-JSON-File:
1137162165791228122.tgs.zip

So, while debugging I figured out that animatableTransform.Rotation is null:
https://github.com/ascora/LottieSharp/blob/80d9cf27ccd234d2b23c523f1ad2b0ea2432f07c/LottieSharp/Animation/Keyframe/TransformKeyframeAnimation.cs#L29

As a result I added null-checks in TransformKeyframeAnimation where _rotation is used and it works fine.

Desktop

  • OS: Windows 10 20H2
  • .NET 4.6.1