bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19133: closed (Re: bug#19133: 25.0.50; Crash in clear-image-cache)


From: Magnus Henoch
Subject: bug#19133: closed (Re: bug#19133: 25.0.50; Crash in clear-image-cache)
Date: Sun, 07 Dec 2014 14:26:36 +0000

Found the crucial difference: the crash happens if you create an image
using data from a string, as opposed to from a file.  This little
function reliably causes Emacs to crash, given any PNG or JPEG file.
(It cannot determine the type of PBM files, and XPM and SVG files don't
make Emacs crash.)

  (defun my-crash-emacs (image-file)
    (interactive "fImage file: ")
    (insert-image (create-image
                   (with-temp-buffer
                     (set-buffer-multibyte nil)
                     (insert-file-literally image-file)
                     (buffer-string))
                   nil t))
    (when (yes-or-no-p "Clear image cache? ")
      (clear-image-cache)))

Regards,
Magnus





reply via email to

[Prev in Thread] Current Thread [Next in Thread]