lispnik / iup

Common Lisp CFFI bindings to the IUP Portable User Interface library (pre-ALPHA)
Other
139 stars 7 forks source link

CCL: LTK-demo: The value #<IHANDLE "canvas" 32EE41F0> is not of the expected type #46

Open defunkydrummer opened 5 years ago

defunkydrummer commented 5 years ago

CCL64 bits v1.12, Windows 10

On loading ltk-demo.lisp:

The value #<IHANDLE "canvas" 32EE41F0> is not of the expected type (OR
                                                                    STRING
                                                                    CFFI-SYS:FOREIGN-POINTER).
   [Condition of type TYPE-ERROR]

Restarts:
 0: [USE-DEFAULT] Continue by returning IUP:+DEFAULT+
 1: [LOAD-SOURCE] Load "c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/projects/iup/examples/ltk-demo.lisp" instead of "c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/projects/iup/examples/ltk-demo.wx64fsl"
 2: [RECOMPILE] Compile "c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/projects/iup/examples/ltk-demo.lisp" into "c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/projects/iup/examples/ltk-demo.wx64fsl" then load "c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/projects/iup/examples/ltk-demo.wx64fsl" again
 3: [RETRY-LOAD] Retry loading #P"c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/projects/iup/examples/ltk-demo.wx64fsl"
 4: [SKIP-LOAD] Skip loading #P"c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/projects/iup/examples/ltk-demo.wx64fsl"
 5: [LOAD-OTHER] Load other file instead of #P"c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/projects/iup/examples/ltk-demo.wx64fsl"
 --more--

Backtrace:
  0: (CD:CREATE-CANVAS #<A Foreign Pointer #x7FFDD8757658> #<IHANDLE "canvas" 32EE41F0>)
  1: (CANVAS-MAP #<IHANDLE "canvas" 32EE41F0>)
  2: (IUP::INVOKE-CALLBACK CANVAS-MAP (#<IHANDLE "canvas" 32EE41F0>) (#<IHANDLE "canvas" 32EE41F0>))
  3: (CFFI-CALLBACKS::|KEYWORD::CANVAS-MAP_CB| 109428248)
  4: (CCL::%PASCAL-FUNCTIONS% 104 109428248)
  5: (NIL #<Unknown Arguments>)
  6: (IUP-CFFI::%IUP-SHOW-XY #<IHANDLE "dialog" 32EE4E70> 65535 65535)
  7: ((:INTERNAL LTK-DEMO))
  8: (IUP::CALL-WITH-IUP #<Compiled-function (:INTERNAL LTK-DEMO) (Non-Global)  #x21035136AF>)
  9: (LTK-DEMO)
      [No Locals]
 10: (#<Anonymous Function #x21035129EF>)
 11: (CCL::$FASL-LFUNCALL #<CCL::FASLSTATE #x2A710F9D>)
 12: (CCL::%FASLOAD "c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/projects/iup/examples/ltk-demo.wx64fsl" #(#<Compiled-function CCL::$FASL-NOOP (Non-Global)  #x10012135F> ..)))
 13: (CCL::%LOAD #P"c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/projects/iup/examples/ltk-demo.wx64fsl" NIL NIL :ERROR :DEFAULT NIL)
 14: (LOAD #P"c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/projects/iup/examples/ltk-demo.wx64fsl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT :PRESERVE-..
 --more--
lispnik commented 5 years ago

Hi, This is likely because your cd repo needs to be updated. A while back I converted some common functionality in im, cd and iup into a project called https://github.com/lispnik/tecgraf-base

defunkydrummer commented 5 years ago

Hi @lispnik ,

The bug submitted yesterday was using the code that you submitted up to yesterday. I also downloaded tecgraf-base at the last version.

Not sure if I follow with "cd" since I don't have "cd" on my computer, only as a subdirectory of the IUP system.

lispnik commented 5 years ago

I haven't been able to reproduce that on my Windows 10 computer yet. I'm using "Version 1.11.5/v1.11.5 (WindowsX8664)" of CCL though.

Just a note, you should have the auxiliary systems installed, too in Quicklisp local-projects :

im
cd
pffft
tecgraf-libs
tecgraf-base

You might try updating master for the iup dir though. While trying to investigate this bug, I ran into something related to callbacks.