Mike Fabian <mike.fabian(a)gmx.de> writes:
> (defun delete-and-split ()
> (interactive)
> (delete-other-windows)
> (split-window))
> (split-window-vertically)
> (insert "が")
> (backward-char)
> (redraw-frame)
> (delete-and-split)
> Fatal error: assertion failed, file
/deb-huge/home/gunnar/src/XEmacs/xemacs/src/objects.h, line 143, RECORD_TYPEP (obj,
&lrecord_font_instance)
>
> [... rest of backtrace see Gunnar's original message,
> Message-ID: <874sdmtok3.fsf(a)eng.cam.ac.uk> ...]
Gunnar offered the following patch, which I am using all the time
since then and apply to every new release of XEmacs (21.1 and 21.2):
Sorry for late answer but my time and expertise are limited.
I think this is a right patch but I'm not 100% sure because
I don't understand redisplay.
The problem is, Fsplit_window incorrectly invalidates face
cache when splitted window has no parents. This doesn't
make sense because Fsplit_window only adds new modeline
between windows and scrolls window to make point visible.
They don't change any faces. Function and variable names
are very cryptic in these functions. I'll probably refactor
it when I have some more time.
2000-12-04 Yoshiki Hayashi <yoshiki(a)xemacs.org>
* window.c (Fsplit_window): Don't invalidate face cache.
Index: window.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/window.c,v
retrieving revision 1.41.2.66
diff -u -r1.41.2.66 window.c
--- window.c 2000/11/07 23:24:35 1.41.2.66
+++ window.c 2000/12/04 02:31:50
@@ -3649,7 +3649,12 @@
|| NILP (XWINDOW (o->parent)->vchild))
{
make_dummy_parent (window);
+#if 0
+ /* #### I can't understand why you have to reset face
+ cachels here. This can cause crash so let's disable it
+ and see the difference. See redisplay-tests.el --yh */
reset_face_cachels (XWINDOW (window));
+#endif
new = o->parent;
XWINDOW (new)->vchild = window;
XFRAME (o->frame)->mirror_dirty = 1;
@@ -3666,7 +3671,10 @@
|| NILP (XWINDOW (o->parent)->hchild))
{
make_dummy_parent (window);
+#if 0
+ /* #### See above. */
reset_face_cachels (XWINDOW (window));
+#endif
new = o->parent;
XWINDOW (new)->hchild = window;
XFRAME (o->frame)->mirror_dirty = 1;
--
Yoshiki Hayashi