Ticket #1039 (new defect)

Opened 19 months ago

Last modified 16 months ago

save-application ignores the :error-handler option in Windows

Reported by: dh Owned by:
Priority: normal Milestone:
Component: Documentation Version: 1.8
Keywords: Cc: m.charles.beaver@…

Description

This code, running both wx86cl and wx86cl64, with both :quit and :quit-quietly, all generate an executable that prints the error and drops into the debugger instead of exiting.

(ccl:save-application "foo.exe"
                      :prepend-kernel t
                      :purify t
                      :toplevel-function (lambda () (error "argh!"))
                      :error-handler :quit)

Attachments

patch.diff Download (4.6 KB) - added by mickbeaver 16 months ago.
A small change that fixes the documentation and exports surrounding this bug. I worked off of the 1.9 Release source code for Linux.

Change History

comment:1 Changed 17 months ago by mickbeaver

Hello,

I would like to add that this happens to me on Linux as well using both the 32-bit and 64-bit versions of 1.9.

-Mick

Changed 16 months ago by mickbeaver

A small change that fixes the documentation and exports surrounding this bug. I worked off of the 1.9 Release source code for Linux.

comment:2 Changed 16 months ago by mickbeaver

  • Cc m.charles.beaver@… added
  • Component changed from Runtime (threads, GC) to Documentation

After digging into the source, this bug seems to be mostly documentation related. CCL has a notion of the current application object. If this object is of type CCL:LISP-DEVELOPMENT-SYSTEM, then the error handler that gets called during an error always goes into a debug break. SAVE-APPLICATION's documentation in the manual does not seem to indicate that :error-handler would ever be ignored, though, which is the real bug. To change the current application object when using SAVE-APPLICATION, you can just specify the :application-class. It looks like CCL:APPLICATION is the best existing choice for this paramter.

I've attached a patch for the documentation and the CCL exports. Here is a workaround for right now, though:

(ccl:save-application "foo.exe"

:prepend-kernel t :purify t :toplevel-function (lambda () (error "argh!")) :application-class 'ccl::application :error-handler :quit)

Note: See TracTickets for help on using tickets.