EOG gets stuck in infinite while loop if animation loops a finite number of times
I'm coming from this pull request on gdkpixbuf for implementing AVIF animations.
Unfortunately, we came across a bug on EOG and EOG forks where an AVIF animation that loops a finite number of times will pin a cpu core after it finishes its last loop. We tracked it down to this function in EOG. It does not expect iter_advance
to return FALSE
for any reason other than "delay time was apparently too short, let's try again". Gdkpixbuf returns FALSE
over and over again because the animation is finished and the frame does not need to be updated again. It never leaves that while loop, EOG becomes unresponsive and pins a cpu core.
PS. Gifs do not replicate this behaviour because the last frame of the last loop in gifs has an obscenely long delay time
. The iter_advance
function in practice never runs into this bug because of that.