[Openmcl-devel] problems defining callback in Clozure Common Lisp Version 1.4-dev-r12428M-trunk (WindowsX8664)
Gary Byers
gb at clozure.com
Sun Jul 19 14:42:32 PDT 2009
The :DISCARD-STACK-ARGS argument to the callback isn't meaningful
on win64; it should probably be ignored.
If you conditionalize it out via something like:
#+win32-target :discard-stack-args
and load the example and do (MAKE-SIMPLE-MS-WINDOW) ... well, I see a
window appear in the upper left corner of the screen, but the height
and width of its content area are 0; that looks like a bug in some
part of the interface translation process. (#$CW_USEDEFAULT should
be #x80000000 - I'm not sure if that's signed or unsigned - but seems
to have been garbled into 0.)
It does seem to be possible to resize the window and drag it around.
On Sun, 19 Jul 2009, Matthew D. Swank wrote:
> 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.
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>
More information about the Openmcl-devel
mailing list