all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [schierlm@gmx.de: Display problems after lots of different (generated) images have been shown]
@ 2007-08-20 15:16 Richard Stallman
  2007-08-24 20:44 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Stallman @ 2007-08-20 15:16 UTC (permalink / raw)
  To: emacs-devel

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 <schierlm@gmx.de>
MIME-Version: 1.0
To: bug-gnu-emacs@gnu.org
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
bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [schierlm@gmx.de: Display problems after lots of different (generated) images have been shown]
  2007-08-20 15:16 [schierlm@gmx.de: Display problems after lots of different (generated) images have been shown] Richard Stallman
@ 2007-08-24 20:44 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2007-08-24 20:44 UTC (permalink / raw)
  To: rms; +Cc: Michael Schierl, emacs-devel

> 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.

I think this was due to a memory leak in xpm_load that was fixed in
June.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-24 20:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-20 15:16 [schierlm@gmx.de: Display problems after lots of different (generated) images have been shown] Richard Stallman
2007-08-24 20:44 ` Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.