LottieSharp icon indicating copy to clipboard operation
LottieSharp copied to clipboard

Unmanaged memory leak

Open JerryGray12 opened this issue 3 years ago • 6 comments

My company is using LottieSharp to display JSON videos in our application via the WPF LottieAnimationView. We are just setting a file name and setting AutoPlay=true. When I run a test program that just displays the video second window, the Unmanaged memory goes up by 8 MB each time the video is run.

We do automation testing on our application and since we have added LottieSharp videos, the automation testing fails quickly with out of memory exceptions.

The leaks appear to be in the SharpDX library.

Is anyone else seeing these?

Expected behavior No unmanaged memory leaks.

Desktop (please complete the following information):

  • OS: Windows 10 64-bit
  • Browser [e.g. chrome, safari]
  • Version Nuget package 1.1.1 for windows desktop development

Additional context Add any other context about the problem here.

JerryGray12 avatar Jul 15 '20 14:07 JerryGray12

Hello. Thank you for your feedback. Can you please give us more details? You could find out memory leak by visual studio and it's could help to find out what is the problem.

OmidID avatar Jul 16 '20 09:07 OmidID

This problem occured in my application

huangmux avatar Sep 09 '20 06:09 huangmux

Hello, anyway to fix this?

breadnone avatar Oct 23 '20 14:10 breadnone

I try to solve this bug but it is related to SharpDX is not terminating objects. So still under develop

OmidID avatar Oct 28 '20 15:10 OmidID

I want to kindly ask, if there is already an update on this? UserControls containing LottieAnimationView are not removed by garbage collection on UserControl Disposal.

rasgath avatar Nov 13 '20 11:11 rasgath

@rasgath Yes. if you check in develop branch you could see I trying to solve this problem. But I can see there is a memory leak in SharpDX which is depricated. So what I doing now to finalized some known bug and then working on a new version that using SkiaSharp. But for the moment I have no idea what could be the best graphic engine backend. SkiaSharp or other alternative to SharpDx.

As I mentioned many times. this is the only WPF Lottie viewer and we need help from comunity to solve the bugs.

OmidID avatar Nov 13 '20 11:11 OmidID