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

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

Display problems after lots of different (generated) images have been sh


From: Michael Schierl
Subject: Display problems after lots of different (generated) images have been shown
Date: Sun, 19 Aug 2007 21:52:41 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:


I have an eLisp file that dynamically generates XPM images and shows
them (25 at a time, and then they are removed from the buffer again).

After using Emacs for a while, it seems that Emacs has problems
redisplaying itself (not only the images, but also other graphical
elements display incorrectly).

If I still used Win98 I'd say it is a lack of GDI objects, but I am
using WinXP and do not think one could reach the GDI object limit there.

I am sure that I do not hold any stale references to these images, but
it seems that they still consume some kind of resources. Killing buffers
or running M-x garbage-collect does not help either.

The leak occurs both with xpm and xbm files (which are the only two
formats suitable for dynamic generation in my opinion). The problem does
not occur if the same image is shown over and over, only if images are
different.


To reproduce:


;; XPM
(let ((img-header "/* XPM */
\"8 8 8 1\"
\"0c #ff0000\" \"1c #00ff00\" \"2c #ffff00\" \"3c #0000ff\"
\"4c #ff00ff\" \"5c #00ffff\" \"6c #ffffff\" \"7c #ffffff\"")
      (img-template "\
\"00000000\" \"00000000\" \"00000000\" \"00000000\" \
\"00000000\" \"00000000\" \"00000000\" \"00000001\"")
      x y v)
  (random t)
  (dotimes (i 17000) ; >16384
    (setq x (random 8)
          y (random 8)
          v (random 8))
    ;; change image slightly
    (aset img-template (+ x (* y 11) 1) (+ ?0 v))
    ;; insert image
    (insert
     (propertize "x" 'display
                 `(image :type xpm
                         :data ,(concat img-header img-template))))
    (redisplay t)
    (delete-char -1)))


;; XBM
(let ((img-template (vector "a" "a" "a" "a" "a" "a" "a" "a"))
      x y)
  (random t)
  (dotimes (i 17000) ; > 16384
    (setq x (random 8)
          v (random 256))
    ;; change image slightly
    (aset img-template x (char-to-string v))
    ;; insert image
    (insert
     (propertize "x" 'display
                 `(image :type xbm :width 8 :height 8
                         :data ,img-template)))
    (redisplay t)
    (delete-char -1)))


In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
 of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: DEU
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t




reply via email to

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