Samsung / rlottie

A platform independent standalone library that plays Lottie Animation.
Other
1.15k stars 223 forks source link

On Windows rlottie hangs (forever) on application shutdown when compiled with MinGW #518

Open leonstyhre opened 2 years ago

leonstyhre commented 2 years ago

Hi!

If rlottie is compiled using MinGW 9.2.0 then the application will hang (seemingly forever) on shutdown if either render() or renderSync() has been called at least one.

This problem does not occur when compiled using MSVC but unfortunately I need to use MinGW for my release builds so that's not a solution for me.

I have also not seen the issue on any of the other operating systems that I've built rlottie on (macOS, Linux, FreeBSD, NetBSD and OpenBSD).

This issue is present on the master branch with the latest commit 875626965959d8e269ca22175c8e1ad190696c43. I have compiled as shared library/DLL and apart from the hang on shutdown, everything seems to work fine with correct rendering and equivalent performance compared to other platforms.

Many thanks in advance!

leonstyhre commented 2 years ago

One additional comment, I just managed to get the MinGW build to work by disabling the threading support using the LOTTIE_THREAD option. After doing this the application shuts down correctly.

So the issue is definitely related to threading somehow.