From unknown Sat Aug 16 13:49:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6258: create-animated-image hangs Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 May 2010 16:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6258 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6258@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.12747175479818 (code B ref -1); Mon, 24 May 2010 16:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2010 16:12:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaGQ-0002YI-Rf for submit@debbugs.gnu.org; Mon, 24 May 2010 12:12:27 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaGP-0002YB-Kx for submit@debbugs.gnu.org; Mon, 24 May 2010 12:12:26 -0400 Received: from lists.gnu.org ([199.232.76.165]:43229) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OGaGK-0000yR-P9 for submit@debbugs.gnu.org; Mon, 24 May 2010 12:12:20 -0400 Received: from [140.186.70.92] (port=38162 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGaGJ-0005VN-BS for bug-gnu-emacs@gnu.org; Mon, 24 May 2010 12:12:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGaGB-0007pC-FE for bug-gnu-emacs@gnu.org; Mon, 24 May 2010 12:12:19 -0400 Received: from smtp-out1.starman.ee ([85.253.0.3]:35733 helo=mx1.starman.ee) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaGB-0007oP-9N for bug-gnu-emacs@gnu.org; Mon, 24 May 2010 12:12:11 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.28.195.cable.starman.ee [82.131.28.195]) by mx1.starman.ee (Postfix) with ESMTP id 5E7193F40CF for ; Mon, 24 May 2010 19:12:07 +0300 (EEST) From: Juri Linkov Organization: JURTA Date: Mon, 24 May 2010 19:03:21 +0300 Message-ID: <87d3wmq8v2.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) When the delay between images in an animated GIF file is 0, then calls for `run-with-timer' without delay hangs up. Replacing it with `run-with-idle-timer' doesn't help. An example of the animated GIF that hangs up is http://en.wikipedia.org/wiki/File:Animated_glider_emblem.gif This patch makes a short delay (0.1 sec) in this case. Visually its speed looks the same as the speed of changing images in Firefox when an animated GIF has no delay. === modified file 'lisp/image.el' --- lisp/image.el 2010-04-02 23:28:46 +0000 +++ lisp/image.el 2010-05-24 16:01:45 +0000 @@ -684,10 +684,13 @@ (defun image-animated-p (image) (let* ((metadata (image-metadata image)) (images (plist-get metadata 'count)) (extdata (plist-get metadata 'extension-data)) - (anim (plist-get extdata #xF9))) - (and (integerp images) (> images 1) - (stringp anim) (>= (length anim) 4) - (cons images (+ (aref anim 1) (* (aref anim 2) 256)))))))) + (anim (plist-get extdata #xF9)) + (tmo (and (integerp images) (> images 1) + (stringp anim) (>= (length anim) 4) + (+ (aref anim 1) (* (aref anim 2) 256))))) + (when tmo + (if (eq tmo 0) (setq tmo 10)) + (cons images tmo)))))) (provide 'image) -- Juri Linkov http://www.jurta.org/emacs/ From unknown Sat Aug 16 13:49:48 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Juri Linkov Subject: bug#6258: closed (Re: bug#6258: create-animated-image hangs) Message-ID: References: <87r5l0rn2e.fsf@mail.jurta.org> <87d3wmq8v2.fsf@mail.jurta.org> X-Gnu-PR-Message: they-closed 6258 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 6258@debbugs.gnu.org Date: Tue, 25 May 2010 16:12:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1274803923-21167-1" This is a multi-part message in MIME format... ------------=_1274803923-21167-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #6258: create-animated-image hangs which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 6258@debbugs.gnu.org. --=20 6258: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D6258 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1274803923-21167-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 6258-done) by debbugs.gnu.org; 25 May 2010 16:11:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGwj4-0005Uw-AI for submit@debbugs.gnu.org; Tue, 25 May 2010 12:11:30 -0400 Received: from smtp-out2.starman.ee ([85.253.0.4] helo=mx2.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGwj0-0005Ua-VA for 6258-done@debbugs.gnu.org; Tue, 25 May 2010 12:11:27 -0400 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Received: from mail.starman.ee (82.131.28.247.cable.starman.ee [82.131.28.247]) by mx2.starman.ee (Postfix) with ESMTP id 5E7483F40FD for <6258-done@debbugs.gnu.org>; Tue, 25 May 2010 19:11:19 +0300 (EEST) From: Juri Linkov To: 6258-done@debbugs.gnu.org Subject: Re: bug#6258: create-animated-image hangs Organization: JURTA References: <87d3wmq8v2.fsf@mail.jurta.org> Date: Tue, 25 May 2010 18:57:45 +0300 In-Reply-To: <87d3wmq8v2.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 24 May 2010 19:03:21 +0300") Message-ID: <87r5l0rn2e.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6258-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) > This patch makes a short delay (0.1 sec) in this case. Committed and closed. -- Juri Linkov http://www.jurta.org/emacs/ ------------=_1274803923-21167-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 24 May 2010 16:12:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaGQ-0002YI-Rf for submit@debbugs.gnu.org; Mon, 24 May 2010 12:12:27 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaGP-0002YB-Kx for submit@debbugs.gnu.org; Mon, 24 May 2010 12:12:26 -0400 Received: from lists.gnu.org ([199.232.76.165]:43229) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OGaGK-0000yR-P9 for submit@debbugs.gnu.org; Mon, 24 May 2010 12:12:20 -0400 Received: from [140.186.70.92] (port=38162 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGaGJ-0005VN-BS for bug-gnu-emacs@gnu.org; Mon, 24 May 2010 12:12:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGaGB-0007pC-FE for bug-gnu-emacs@gnu.org; Mon, 24 May 2010 12:12:19 -0400 Received: from smtp-out1.starman.ee ([85.253.0.3]:35733 helo=mx1.starman.ee) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaGB-0007oP-9N for bug-gnu-emacs@gnu.org; Mon, 24 May 2010 12:12:11 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.28.195.cable.starman.ee [82.131.28.195]) by mx1.starman.ee (Postfix) with ESMTP id 5E7193F40CF for ; Mon, 24 May 2010 19:12:07 +0300 (EEST) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: create-animated-image hangs Organization: JURTA Date: Mon, 24 May 2010 19:03:21 +0300 Message-ID: <87d3wmq8v2.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) When the delay between images in an animated GIF file is 0, then calls for `run-with-timer' without delay hangs up. Replacing it with `run-with-idle-timer' doesn't help. An example of the animated GIF that hangs up is http://en.wikipedia.org/wiki/File:Animated_glider_emblem.gif This patch makes a short delay (0.1 sec) in this case. Visually its speed looks the same as the speed of changing images in Firefox when an animated GIF has no delay. === modified file 'lisp/image.el' --- lisp/image.el 2010-04-02 23:28:46 +0000 +++ lisp/image.el 2010-05-24 16:01:45 +0000 @@ -684,10 +684,13 @@ (defun image-animated-p (image) (let* ((metadata (image-metadata image)) (images (plist-get metadata 'count)) (extdata (plist-get metadata 'extension-data)) - (anim (plist-get extdata #xF9))) - (and (integerp images) (> images 1) - (stringp anim) (>= (length anim) 4) - (cons images (+ (aref anim 1) (* (aref anim 2) 256)))))))) + (anim (plist-get extdata #xF9)) + (tmo (and (integerp images) (> images 1) + (stringp anim) (>= (length anim) 4) + (+ (aref anim 1) (* (aref anim 2) 256))))) + (when tmo + (if (eq tmo 0) (setq tmo 10)) + (cons images tmo)))))) (provide 'image) -- Juri Linkov http://www.jurta.org/emacs/ ------------=_1274803923-21167-1--