#929837 libgdk-pixbuf2.0-dev: Memory leak viewing animated gif

#929837#5
Date:
2019-06-01 13:39:11 UTC
From:
To:
Hello!

When animated gif(in this case, size 18M) is tried to be viewed, libgdk-pixbuf
leaks memory and consumes >1.87G of memory.
This bug can be reproduced either by using any of the image viewers using
libgdk-pixbuf (e.g. eog, ristretto) and/or by writing small code snippet using
the lib.


Steps to reproduce:
1.  Download the sample gif
wget -c https://raw.githubusercontent.com/mathieudutour/medium-to-own-
blog/master/docs/screencast.gif

2. Now to reproduce either open the downloaded gif with eog/ristretto or use
this small code snippet:
https://gist.github.com/mertyildiran/f2a0746fbdbce728911854a2f038ee22

3. If you are using the code snippet then please put the proper image path in
line 43. and compile as:
$ gcc gtk-gif.c $(pkg-config --cflags --libs gtk+-2.0) -o gtk-gif
and then execute gtk-gif

top o/p from sample run:
  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
31584 rootkea   20   0 2121372 1.875g  17340 R  13.9 50.3   0:36.04 gtk-gif

Thanks!

#929837#10
Date:
2019-07-08 17:01:28 UTC
From:
To:
I can reproduce this bug on latest Debian stable Buster having
libgdk-pixbuf2.0-dev 2.38.1+dfsg-1

Regards,
Avinash Sonawane (rootKea)
PICT, Pune
https://rootkea.wordpress.com