all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: Emacs development discussions <emacs-devel@gnu.org>
Subject: Hard bug caused by window management code?
Date: Wed, 27 Mar 2013 10:11:48 +0400	[thread overview]
Message-ID: <51528DA4.10300@yandex.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

I'm trying to push some changes to window management code and now using a kind of
simple automated test stuff (attached), mostly to check whether the code doesn't
crash or trigger eassert. Results are totally unexpected - even with 24.3, running:

emacs -Q -l window-test.el -f window-test

causes 2.7G RSS and following OOM killer invocation for the Emacs process.

Can someone run this stuff and see what happens? (On MS-Windows or OSX, you
might want to look for test files somewhere else rather than in /etc).

Dmitry

[-- Attachment #2: window-test.el --]
[-- Type: text/plain, Size: 1188 bytes --]

;; Window random action test.

(defun random-entry (entries)
  (let ((size (length entries)))
    (if (= 1 size) (car entries)
      (nth (abs (% (random) (length entries))) entries))))

(defun window-test ()
  (interactive)
  (let ((conf (current-window-configuration))
	(file-list (directory-files "/etc" t "\\.conf$")))
    (while t
      (let ((action (abs (% (random) 11))))
	(cond ((zerop action)
	       (and (< 16 (window-height)) (split-window-vertically)))
	      ((= 1 action)
	       (and (< 16 (window-width)) (split-window-horizontally)))
	      ((= 2 action)
	       (and (< 1 (count-windows)) (delete-window)))
	      ((= 3 action)
	       (balance-windows))
	      ((= 4 action)
	       (delete-other-windows))
	      ((= 5 action)
	       (select-window (random-entry (window-list))))
	      ((= 6 action)
	       (let ((file (random-entry file-list)))
		 (and (file-readable-p file) (find-file file))))
	      ((= 7 action)
	       (kill-buffer))
	      ((= 8 action)
	       (setq conf (current-window-configuration)))
	      ((= 9 action)
	       (set-window-configuration conf))
	      ((= 10 action)
	       (mapcar 'kill-buffer (buffer-list))))
	(sit-for 0.2)))))

             reply	other threads:[~2013-03-27  6:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27  6:11 Dmitry Antipov [this message]
2013-03-27  7:07 ` Hard bug caused by window management code? Eli Zaretskii
2013-03-27  7:23 ` martin rudalics
2013-03-27  9:26   ` Dmitry Antipov
2013-03-27 10:02     ` martin rudalics
2013-03-27 10:39       ` Dmitry Antipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51528DA4.10300@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.