[Openmcl-devel] problems defining callback in Clozure Common Lisp Version 1.4-dev-r12428M-trunk (WindowsX8664)

Matthew D. Swank akopa at charter.net
Sun Jul 19 14:19:33 PDT 2009


On Windows 7 RC when I "(require :mswin)", the following error
occurs:

value NIL is not of the expected type (OR FIXNUM BIGNUM).
   [Condition of type TYPE-ERROR]

Backtrace:
  0: (ASH NIL -3)
  1: (DEFINE-CALLBACK SIMPLE-WNDPROC (:DISCARD-STACK-ARGS :<HWND>
  HWND :<UINT> MSG :<WPARAM> ..))) 
  2: (DEFCALLBACK (DEFCALLBACK SIMPLE-WNDPROC ..)) 
  3: (FUNCALL #<Compiled-function DEFCALLBACK Macroexpander
  #x140A197DF> (DEFCALLBACK SIMPLE-WNDPROC ..) 
  4: (MACROEXPAND-1 (DEFCALLBACK SIMPLE-WNDPROC ..)) 
  5:(CCL::CHEAP-EVAL-MACROEXPAND-1 (DEFCALLBACK SIMPLE-WNDPROC ..)) 
  6: (CCL::CHEAP-EVAL-IN-ENVIRONMENT (DEFCALLBACK SIMPLE-WNDPROC ..)) 
  7: ((:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY
  CCL::LOAD-FROM-STREAM)) 
  8: (CCL::CALL-WITH-COMPILATION-UNIT
  #<COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY
  CCL::LOAD-FROM-STREAM) #x525EE1F> :OVERRIDE NIL) 
  9: (CCL::LOAD-FROM-STREAM #<BASIC-FILE-CHARACTER-INPUT-STREAM
("c:/cygwin/usr/local/src/ccl/ccl/examples/mswin.lisp"/6388 ISO-8859-1)
#x141F3E43D> NIL) 
 10: (CCL::%LOAD
 #P"c:/cygwin/usr/local/src/ccl/ccl/examples/mswin.lisp" NIL
 NIL :ERROR :DEFAULT) 
 11: (LOAD #P"c:/cygwin/usr/local/src/ccl/ccl/examples/mswin" :VERBOSE
 NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT) 
 12: (CCL::MODULE-PROVIDE-SEARCH-PATH :MSWIN) 
 13: (CCL::SOME-XX-ONE 0 NIL #<COMPILED-LEXICAL-CLOSURE (:INTERNAL
 REQUIRE) #x525F0FF> (CCL::MODULE-PROVIDE-SEARCH-PATH
 CCL::MODULE-PROVIDE-ASDF)) 
 14: (REQUIRE :MSWIN NIL) 
 15: (CCL::CALL-CHECK-REGS REQUIRE :MSWIN) 
 16: (SWANK::EVAL-REGION "(require :mswin)\n") 
 17: ((:INTERNAL SWANK::REPL-EVAL))
 18: (SWANK::TRACK-PACKAGE #<COMPILED-LEXICAL-CLOSURE (:INTERNAL
SWANK::REPL-EVAL) #x141DD685F>) 
 19: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation
 request." #<COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::REPL-EVAL)
 #x141DD68DF>) 
 20: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<COMPILED-LEXICAL-CLOSURE
(:INTERNAL SWANK::REPL-EVAL) #x141DD691F>) 
 21: (SWANK::REPL-EVAL "(require :mswin)\n") 
 22: (CCL::CALL-CHECK-REGS SWANK:LISTENER-EVAL "(require :mswin)\n") 
 23: (SWANK::EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(require :mswin)\n")
 "COMMON-LISP-USER" 331) 
 24: (SWANK::PROCESS-REQUESTS NIL) 
 25: ((:INTERNAL SWANK::HANDLE-REQUESTS))
 26: (#<Anonymous Function #x14115978F> #<Compiled-function
SWANK:SWANK-DEBUGGER-HOOK #x1411F455F> #<COMPILED-LEXICAL-CLOSURE
(:INTERNAL SWANK::HANDLE-REQUESTS) #x141D8397F>) 
 27: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* .
#<SWANK-BACKEND::SLIME-OUTPUT-STREAM #x14130AA7D>) (*STANDARD-INPUT* .
#<SWANK-BACKEND::SLIME-INPUT-STREAM #x14130AE3D>) ..))) 
 28: (SWANK::CALL-WITH-CONNECTION #<CONNECTION #x1412501ED>
#<COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::HANDLE-REQUESTS)
#x141D8397F>) 
 29: (SWANK::HANDLE-REQUESTS #<CONNECTION #x1412501ED> NIL) 
 30: (SWANK::CALL-WITH-BINDINGS NIL #<COMPILED-LEXICAL-CLOSURE
(:INTERNAL SWANK::SPAWN-REPL-THREAD) #x141310C2F>) 
 31: (#<Anonymous Function #x14116427F>) 
 32: (CCL::RUN-PROCESS-INITIAL-FORM #<PROCESS repl-thread(10) [Active]
 #x1412F9F6D> (#<COMPILED-LEXICAL-CLOSURE (:INTERNAL
 CCL::%PROCESS-RUN-FUNCTION) #x1412F9D0F>)) 
 33: ((:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (PROCESS))) #<PROCESS
 repl-thread(10) [Active] #x1412F9F6D> (#<COMPILED-LEXICAL-CLOSURE
 (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #x1412F9D0F>)) 
 34: ((:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION))

It seems to be related to num-arg-bytes being nil in define-callback.

Num-arg-bytes is bound here (macros.lisp:2610):

   (multiple-value-bind (rlets lets dynamic-extent-names inits
                         foreign-return-type fp-args-form
                         error-return-offset num-arg-bytes) 
      (funcall (ftd-callback-bindings-function *target-ftd*)
               stack-ptr 
               fp-args-ptr 
               (arg-names) 
               (arg-specs)
               result-type-spec 
               struct-return-arg-name)
       ...


Matt
-- 
"You do not really understand something unless you can explain it to
your grandmother." -- Albert Einstein.



More information about the Openmcl-devel mailing list