From xemacs-m  Wed Mar 19 16:27:50 1997
Received: from venus.Sun.COM (venus.Sun.COM [192.9.25.5])
	by xemacs.org (8.8.5/8.8.5) with SMTP id QAA28886
	for <xemacs-beta@xemacs.org>; Wed, 19 Mar 1997 16:27:49 -0600 (CST)
Received: from Eng.Sun.COM ([129.146.1.25]) by venus.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id OAA22577; Wed, 19 Mar 1997 14:27:21 -0800
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id OAA02624; Wed, 19 Mar 1997 14:27:18 -0800
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id OAA28570; Wed, 19 Mar 1997 14:27:18 -0800
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id OAA14528; Wed, 19 Mar 1997 14:27:17 -0800
Date: Wed, 19 Mar 1997 14:27:17 -0800
Message-Id: <199703192227.OAA14528@xemacs.eng.sun.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Martin Buchholz <mrb@Eng.Sun.COM>
To: Steven L Baur <steve@miranova.com>
Cc: xemacs-beta@xemacs.org
Subject: Re: Total disaster in 20.1
In-Reply-To: <m2afnzy30d.fsf@altair.xemacs.org>
References: <m2rahb3a8w.fsf@altair.xemacs.org>
	<199703192104.QAA23695@fhat.stat.sc.edu>
	<m2afnzy30d.fsf@altair.xemacs.org>
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>

>>>>> "sb" == Steven L Baur <steve@miranova.com> writes:

sb> Thanks Anthony, Mark and Michael.  It appears this is MULE related,
sb> Latin-1 XEmacsen don't appear to crash.

sb> Why doesn't this patch work?

Why doesn't it crash for me, even with Mule?

One problem might be that no-conversion doesn't mean no conversion -
end of line character fiddling is still done.  If you really want no
conversion, use the 'binary coding system instead.  There are probably
other places in the code that does this wrong.

The code to read in a compressed xpm inserts the xpm file, writes it
to a temp file, calls zcat with the temp file as input, and inserts
the output of zcat - this requires 2 decodings and 1 encoding.  Things
can go wrong at any of these steps.  One improvement is to call zcat
directly on the xpm.Z file instead of doing an extra hopefully-no-op
pass of decoding/encoding.

sb> Index: lisp/prim/about.el
sb> ===================================================================
sb> RCS file: /usr/local/xemacs/xemacs-20.0/lisp/prim/about.el,v
sb> retrieving revision 1.7
sb> diff -u -r1.7 about.el
sb> --- about.el	1997/03/16 03:05:31	1.7
sb> +++ about.el	1997/03/19 21:29:04
sb> @@ -180,10 +180,14 @@
sb>  		(save-restriction
sb>  		  (set who nil)
sb>  		  (narrow-to-region (point) (point))
sb> -		  (insert-file-contents who-xpm)
sb> +		  (let ((coding-system-for-read 'no-conversion))
sb> +		    (insert-file-contents who-xpm))
sb>  		  (if (looking-at "\037\235") ;may already be decompressed...
sb> -		      (call-process-region (point-min) (point-max)
sb> -					   "zcat" t t nil))
sb> +		      (let ((coding-system-for-write 'no-conversion)
sb> +			    process-input-coding-system
sb> +			    process-output-coding-system)
sb> +			(call-process-region (point-min) (point-max)
sb> +					     "zcat" t t nil)))
sb>  		  (set who (make-glyph
sb>  			    (prog1 (buffer-string)
sb>  			      (delete-region (point-min) (point-max)))))

