Article View: gnu.epoch.misc
Article #170Bug in set-window-configuration in Epoch 4.2
From: Rick Braumoeller
Date: Thu, 10 Sep 1992 09:11
Date: Thu, 10 Sep 1992 09:11
83 lines
3326 bytes
3326 bytes
System: SGI Personal Irix running Irix 4.0.5
Epoch version: 4.2.5
I've been using some homegrown Emacs lisp code to keep a group
of window configurations stored that I can toggle through.
This code works fine in vanilla Emacs, but causes Epoch to
crash almost instantly. Here is the lisp code:
window-ring.el
---------------------------------------------------
(defun put-at-end (elem list)
(if (cdr list) (cons (car list) (put-at-end elem (cdr list)))
(cons (car list) (list elem))))
(defun rotate-ring (ring)
(cond ((not ring) ()) ; There is no ring to rotate
((not (cdr ring)) ring) ; Ring has one member
(t (put-at-end (car ring) (cdr ring)))))
(defun prepend-ring (elem ring)
(cons elem ring))
(defun chop-ring (ring)
(if (not ring) ()
(cdr ring)))
(defvar window-config-ring ()) ; Start will a null ring
(defun chop-window-config-ring ()
(interactive)
(setq window-config-ring
(chop-ring window-config-ring)))
(defun add-to-window-config-ring ()
(interactive)
(setq window-config-ring
(prepend-ring (current-window-configuration) window-config-ring)))
(defun rotate-window-config-ring ()
(interactive)
(setq window-config-ring (rotate-ring window-config-ring))
(set-window-configuration (car window-config-ring))
(recenter nil))
(global-set-key "\C-c\C-a" 'add-to-window-config-ring)
(global-set-key "\C-t" 'rotate-window-config-ring)
(global-set-key "\C-c\C-q" 'chop-window-config-ring)
------------------------------------------------------
Here's how I cause Epoch to crash. First, split the
window vertically, then horizontally, and store that
configuration in the window ring (C-x 2 C-x 5 C-c C-a).
Then go back to one window and store that (C-x 0 C-x 0
C-c C-a). Now toggle to the previously stored window
config. with C-t. Epoch has a segmentation fault.
In frustration, I tried (foolishly) to debug this.
I realized soon that this is way beyond my ability, but
here's what little I did find out:
Epoch crashes on line 661-3 on x11term.c, because
ws->cur_char->xpos is an invalid dereference.
661: if (!ws->cur_line || !ws->cur_char
662: || ws->cur_char->xpos < w->pixleft
663: || ws->cur_char->xpos > w->pixleft + w->pixwidth)
ws->cur_char got invalidated on line 526 of x11term.c:
526: ws->new_cur_char = ws->cur_char = XLINE(w->lines)->body;
w->lines->body is also invalid here (it looks like).
Is it reasonable for me to expect that this will be solved
in the near future? Or can you guys give me enough to go
on to solve this problem, with a patch, or whatever?
This is really the only thing keeping me from switching
over to Epoch, and I'd REALLY like to switch.
-----
Rick Braumoeller rickb@mti.sgi.com
Silicon Graphics, Inc. (415) 390-4506
Technical Details
Message-ID:
<9209102311.AA02195@farfle.mti.sgi.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!farfle.mti.SGi.COM!rickbShow Full Headers
Complete Article Headers
Newsgroups: gnu.epoch.misc Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!farfle.mti.SGi.COM!rickb From: rickb@farfle.mti.SGi.COM (Rick Braumoeller) Subject: Bug in set-window-configuration in Epoch 4.2 Message-ID: <9209102311.AA02195@farfle.mti.sgi.com> Sender: daemon@cis.ohio-state.edu Organization: GNUs Not Usenet Distribution: gnu Date: Thu, 10 Sep 1992 09:11:40 GMT Lines: 87