Forum

GifReader crashes

The GifReader crashes v4 in any of it’s versions. (URL, Reactive, etc.)
Sometimes no error, but rendering freezes.

On Gamma 2020.1.3

We need a little more info, a simple example (https://en.wikipedia.org/wiki/GIF) on gamma 2020.1.4 worked just fine for me.

On 2020.1.4 I’m experiencing the same behaviour.
Just creating the GifReader (Url) already throws an exception.
Then, when loading a gif with Url the next exception.
And using the other GifReader kills all rendering. (Renderer freezes, IO boxes become unresponsive).

This happens when I create the node in a fresh patch:

image

Ahh it’s about GifReader (Url). Thanks, will put it into the tracker.

Actually all the GifReader versions don’t work for me… But thanks!

am afraid i cannot reproduce this with 2020.1.4
can you peek inside the node and see where the exception is coming from?

I still have the same behaviour in 2020.2.0.

Gif Player crashing skia rendering permanently and Gif Reader throwing exceptions.

image

Had another look and managed to get rid of the null pointer if given path/url was either empty or not valid (one has to use https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_(large).gif instead of https://en.wikipedia.org/wiki/GIF#/media/File:Rotating_earth_(large).gif).

Check upcoming preview build (> 2020.1.8-192)

Thanks, using a valid path makes sense ;)
Unfortunately I’m still having issues loading some gifs, especially larger ones.
For example this one: https://www.dropbox.com/s/i93xjahkd39p7az/voyage11.gif?dl=0
Or that one: https://www.dropbox.com/s/5zh3uy8ir6x8067/GettingStarted5.gif?dl=0
I’m trying to load them locally from the harddisk.
Sometimes the second, smaller one, is successfully loaded, but even the GifReader (Reactive) basically freezes vvvv almost a minute.

This shouldn’t freeze vvvv, should it? While the GifReader is loading, I mean.

image

I can confirm that it takes ages to load those gifs. This also explains that the system seems to hang when changing something in the patch while the gif is still loading. Reason being how the AsyncTask region is written internally - it aquires a lock the hotswap has to wait for -> red bar at the top left corner.
Instead of tackling the AsyncTask region (which could’ve other implications and can be considered a separate issue) I modifed the internas of the GifReader so that it instead makes direct use of Task.Run to load the gif. I’ve also added a memory copy for the file based one, which seems to reduce overall load time.

Changes will be available in upcoming preview (> 2020.1.8-193).

4 Likes

Great, thanks! Also for the explanation!