let's not apply this. i actually have a whole raft of changes pending that fix this
more completely -- pending final changelogs from martin (hint hint).
i'll copy the relevant patches tomorrow and commit them.
Jan Vroonhof wrote:
"Daniel Pittman" <daniel(a)danann.net> writes:
> fmt=0x8208720 "Can't call a conversion function from a conversion
function") at eval.c:2266
> #28 0x808ef76 in dfc_convert_to_external_format (source_type=DFC_TYPE_DATA,
> source=0xbf807824, coding_system=137147428, sink_type=DFC_TYPE_DATA,
> sink=0xbf80781c) at buffer.c:1873
> #29 0x817aa53 in std_handle_out_va (stream=0x403d38e0,
> fmt=0x8217a20 "Fatal error: assertion failed, file %s, line %d,
%s\n",
> args=0xbf809858) at print.c:177
> #30 0x817ab2b in stderr_out (
> fmt=0x8217a20 "Fatal error: assertion failed, file %s, line %d,
%s\n")
> at print.c:193
> #31 0x80bb005 in assert_failed (file=0x8204d06 "lisp.h", line=1425,
> expr=0x8204f40 "RECORD_TYPEP (obj, lrecord_type_lcrecord_list)")
> at emacs.c:2883
> #32 0x80851f6 in allocate_managed_lcrecord (lcrecord_list=137622592)
> at lisp.h:1425
> #33 0x8170f39 in Lstream_new (imp=0x8272f20, mode=0x8248aec "w")
> at lstream.c:239
> #34 0x8172ba4 in make_resizing_buffer_output_stream () at lstream.c:1349
> #35 0x80b12c7 in emacs_doprnt_string_va (
> format_nonreloc=0x8208720 "Can't call a conversion function from a
conversion function", format_reloc=137029460, format_length=-1, vargs=0xbf809958)
> at doprnt.c:830
> #36 0x80bdf94 in error (
> fmt=0x8208720 "Can't call a conversion function from a conversion
function") at eval.c:2266
... repeated a zillion times.
Trying to be clever in stderr_out (which can be used in the middle of
a crash, redisplay etc) is bad juju.
Let's undo that change, so we can at least seee the real problem
[Will apply this after I get around to actually testing it]
2000-05-10 Jan Vroonhof <vroonhof(a)math.ethz.ch>
* print.c (fatal):
(stderr_out): Do not do code conversion.
(stdout_out): Do code conversion.
(std_handle_out_va): add recode argument.
Index: print.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/src/print.c,v
retrieving revision 1.27.2.17
diff -u -r1.27.2.17 print.c
--- print.c 2000/03/13 10:04:29 1.27.2.17
+++ print.c 2000/05/10 12:33:08
@@ -166,7 +166,7 @@
msw_output_console_string(). */
static int
-std_handle_out_va (FILE *stream, const char *fmt, va_list args)
+std_handle_out_va (FILE *stream, int recode, const char *fmt, va_list args)
{
Bufbyte kludge[8192];
Extbyte *extptr;
@@ -174,15 +174,22 @@
int retval;
retval = vsprintf ((char *) kludge, fmt, args);
- TO_EXTERNAL_FORMAT (DATA, (kludge, strlen ((char *) kludge)),
+ if (recode)
+ {
+ TO_EXTERNAL_FORMAT (DATA, (kludge, strlen ((char *) kludge)),
ALLOCA, (extptr, extlen),
Qnative);
+ }
std_handle_out_external (stream, Qnil, extptr, extlen, 1, 1);
return retval;
}
/* Output portably to stderr or its equivalent; call GETTEXT on the
- format string. Automatically flush when done. */
+ format string. Automatically flush when done.
+
+ We do not call std_handle_va because that tries to do code conversion
+ which is not a good idea in the middle of a crash
+*/
int
stderr_out (const char *fmt, ...)
@@ -190,7 +197,7 @@
int retval;
va_list args;
va_start (args, fmt);
- retval = std_handle_out_va (stderr, GETTEXT (fmt), args);
+ retval = std_handle_out_va (stderr, 0, GETTEXT (fmt), args);
va_end (args);
return retval;
}
@@ -204,7 +211,7 @@
int retval;
va_list args;
va_start (args, fmt);
- retval = std_handle_out_va (stdout, GETTEXT (fmt), args);
+ retval = std_handle_out_va (stdout, 1 , GETTEXT (fmt), args);
va_end (args);
return retval;
}
@@ -216,7 +223,7 @@
va_start (args, fmt);
stderr_out ("\nXEmacs: ");
- std_handle_out_va (stderr, GETTEXT (fmt), args);
+ std_handle_out_va (stderr, 0, GETTEXT (fmt), args);
stderr_out ("\n");
va_end (args);
--
Ben
In order to save my hands, I am cutting back on my mail. I also write
as succinctly as possible -- please don't be offended. If you send me
mail, you _will_ get a response, but please be patient, especially for
XEmacs-related mail. If you need an immediate response and it is not
apparent in your message, please say so. Thanks for your understanding.
See also
http://www.666.com/ben/chronic-pain/