[Openmcl-devel] Cockpit Error using SAVE-APPLICATION?
gb at clozure.com
Wed Nov 5 23:53:04 PST 2008
It's a bug: the function specified by :toplevel-function was being
run before the image had finished initializing itself (notably, before
streams like *TERMINAL-IO* were usable.)
That should be fixed in svn for both 1.2 and the trunk.
On Wed, 5 Nov 2008, j-anthony at comcast.net wrote:
> I am creating an application via save-application. On start with the
> created image (at this point is w/o the kernel appended so is started with
> ccl -I <image-name>), I am blowing off with an error which makes me think I
> am doing something wrong, which is likely obvious to those who've done this
> with CCL before (I've done this all the time with ACL).
> Anyway, here is the very simple example:
> $ ccl
> Welcome to Clozure Common Lisp Version 1.2-r10552 (LinuxX8664)!
> (defun apri-toplevel () (format t "~%Persistence starts") (dotimes (i 10)
> (sleep 5) (format t ".")))
> (save-application "/var/aprigo/Persistence/persistence.lx64"
> :toplevel-function 'apri-toplevel)
> $ ccl -I /var/aprigo/Persistence/persistence.lx64
> Error during early application initialization:
> Fault during write to memory address #x165CE9F8
> ? for help
>  OpenMCL kernel debugger: (K)
>  OpenMCL kernel debugger: Killed
> If I change the toplevel to:
> (defun apri-toplevel () :apri-done)
> then it seems to work. By "seems to work" I mean that it starts and does
> not give the error. But I would have thought that since the toplevel just
> immediately returns, the image would exit. Apparently that is not the
> semantics of save-application/toplevel-function-behavior. So, questions
> 1. Is trying to write from the toplevel somehow bogus and that is causing
> the error? If not, anyone know what I am doing wrong with this?
> 2. If the toplevel isn't the thing which controls a "controlled" exit, what
> is a/the canonical way of exiting from such an image?
> Many thanks in advance for any info
> mail2web.com Enhanced email for the mobile individual based on Microsoft®
> Exchange - http://link.mail2web.com/Personal/EnhancedEmail
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
More information about the Openmcl-devel