Subject: Re: bug#16878: 24.3.50; gif animation continues even after killing buffer

From: Eli Zaretskii <[email-masked]>
Date: Tue, 25 Feb 2014 20:29:03 +0200

> From: Ivan Kanis <[email-masked]>
> Cc: [email-masked]
> Date: Tue, 25 Feb 2014 18:57:08 +0100
> 
> February, 25 at 19:31 Eli wrote:
> 
> >> From: Ivan Kanis <[email-masked]>
> >> Cc: [email-masked]
> >> Date: Tue, 25 Feb 2014 18:06:20 +0100
> >> 
> >> Lisp Backtrace:
> >> "image-metadata" (0xbfffd4e8)
> >> "image-multi-frame-p" (0xbfffd7e8)
> >> "image-animate-timeout" (0xbfffdb04)
> >> "apply" (0xbfffdc08)
> >> "byte-code" (0xbfffdee0)
> >> "timer-event-handler" (0xbfffe2d0)
> >
> > Thanks.  So now the question becomes: which timer is that whose
> > handler is being run?
> 
> I am not sure I understand the question.

Look at the Lisp backtrace above: this whole business started from
some timer which eventually cause image-animate-timeout to run.  The
way to fix this is either stop the timer when the buffer is killed, or
teach image-animate-timeout to check that the buffer still exists,
before it calls image-multi-frame-p etc.

> Can you reproduce it?

No.  I don't have Emacs with Imagemagick support anywhere near me,
sorry.  Perhaps someone else could look into this, then.