emacs-devel
[Top][All Lists]
Advanced

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

address@hidden: Display problems after lots of different (generated) ima


From: Richard Stallman
Subject: address@hidden: Display problems after lots of different (generated) images have been shown]
Date: Mon, 20 Aug 2007 11:16:28 -0400

Would someone please DTRT?  And please suggest to him that he not
refer to Microsoft Windows as "win".

------- Start of forwarded message -------
X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY 
        autolearn=failed version=3.1.0
Date: Sun, 19 Aug 2007 21:52:41 +0200
From: Michael Schierl <address@hidden>
MIME-Version: 1.0
To: address@hidden
Content-Type: text/plain; charset=ISO-8859-15
Subject: Display problems after lots of different (generated) images have
 been shown

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


_______________________________________________
bug-gnu-emacs mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
------- End of forwarded message -------




reply via email to

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