From: glauber
Subject: Using CLOCC xml.lisp to print XML in XML format
Date: 
Message-ID: <892f97d1.0208130549.417cd5b@posting.google.com>
I'm having an interesting problem using xml.lisp from CLOCC.

I just installed a very recent CLOCC/CLLIB snapshot, using the
precompiled CLISP 2.29 for Windows:
GNU CLISP 2.29 (released 2002-07-25) (built 3236982455) (memory
3237901292)
Features:
(CLOS LOOP COMPILER CLISP ANSI-CL COMMON-LISP LISP=CL INTERPRETER
SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN FFI UNICODE
BASE-CHAR=CHARACTER SYSCALLS DIR-KEY WIN32)

I'm running it in -ansi mode. The OS is Windows 98.

I used the "lisp only" compile instructions for CLOCC, no problems.



Here we go. Assume a really simple XML document (i called it
"test2.xml"):

<?xml version="1.0" encoding="UTF-8"?>
<!--Simple XML document for practicing on-->
<a><b>test</b></a>

And also assume a real simple lisp program:

(load "clocc.lisp")
(eval-when (compile load eval)
  (require :cllib-xml  #p"clocc:src;cllib;xml"))
(defvar xml (cllib:xml-read-from-file "test2.xml"))
(let ((cllib:*xml-print-xml* :sgml)) (print xml))


The (print xml) gives me a SIGSEGV. Here's the full output:

[CLLIB:WITH-XML-FILE]
 * [C:\clisp\clocc\src\cllib\entities.xml 20,741 bytes]...done
[entities(%/&): 0/251] [bytes: 20,741] [run: 0.550 sec] [real: 0.550
sec]
[CLLIB:WITH-XML-FILE]
 * [test2.xml 106 bytes]...done [entities(%/&): 0/251] [bytes: 106]
[run: 0.600 sec] [real: 0.600 sec]
 * new XML name: "a"
 * new XML name: "b"


*** - handle_fault error2 ! address = 0xF8090067 not in
[0x5E35C2E0,0x5E380000)
!
SIGSEGV cannot be cured. Fault address = 0xF8090067.



If i set *xml-print-xml* to :readably instead of :sgml, i get this
error:

*** - Program stack overflow. RESET
[1]>



If, instead of
(let ((cllib::*xml-print-xml* :sgml)) (print xml))
i do
(let ((cllib::*xml-print-xml* :sgml)) (dolist (elem xml) (print
elem)))

(that is, printing one element at a time instead of trying to print
the whole document), then i do get an xml printout, as expected (but
this doesn't cure the stack overflow problem with :readably).

I'd appreciate any ideas or pointers.

Thank you very much.


glauber
···············@experian.com
From: glauber
Subject: Re: Using CLOCC xml.lisp to print XML in XML format
Date: 
Message-ID: <892f97d1.0208150406.51d98709@posting.google.com>
For the record, this turned out to be a CLISP problem. The newest
sources from CVS (after the 2.29 release) fix it.

g


··········@my-deja.com (glauber) wrote in message news:<···························@posting.google.com>...
> I'm having an interesting problem using xml.lisp from CLOCC.
[...]
> 
> *** - handle_fault error2 ! address = 0xF8090067 not in
> [0x5E35C2E0,0x5E380000)
> !
> SIGSEGV cannot be cured. Fault address = 0xF8090067.
> 
[...]