[cells-gtk-devel] can't run testprogram

Peter Hildebrandt peter.hildebrandt at gmail.com
Thu Oct 23 09:51:10 UTC 2008


Hi Martin,

welcome aboard.  I am quite busy these days, and I don't have access
to my linux box at the moment, therefore I can only give a few general
comments.

First, the sbcl specific string coding stuff has changed in recent
SBCL versions, I believe, so it might well be the case that this is
legacy code.  Once I get around to setting up my linux box again (just
waiting for Ubuntu 8.10 next weekend), I will clean up that mess and
hopefully commit something that works out of the box on a current
system again.  I worked with SBCL 1.0.11 when I wrote that code, to
give you an idea.

The context function used to be part of Tamas Papp's cl-cairo2, I
believe.  Maybe he has changed something in there recently.  Depending
on what you are up to, there's four options:
1) You play around with everything but cairo (you might even use
opengl for drawing if you like -- just comment out the cairo tabs in
test-gtk)
2) You wait until I get around to fixing this -- maybe I'll get around
to it within the next two weeks, but I would not hold my breath.
Strategy consulting is inherently unpredictable ...
3) You fix it yourself.  Maybe understand the cairo parts a little
better and get in touch with Tamas.
4) You magically find another toolkit that runs better than cells-gtk3
and provides cairo drawing ... I would not hold my breath either ;-)

So long,

Peter

2008/10/23 Martin Kielhorn <kielhorn.martin at googlemail.com>:
>
>
> 2008/10/22 Martin Kielhorn <kielhorn.martin at googlemail.com>
>>
>> hi,
>> i tried to install cells-gtk following the instructions from
>> http://www.washbear-network.de/peterblog/getting-started-with-cells-gtk
>>
>> and
>> http://www.washbear-network.de/peterblog/2008/04/13/cells-gtk3/
>>
>> But I can't even run the examples. There seems to be an error in how
>> strings
>> are handled.
>
> I resolved the issue by changing  the following lines in
> gtk-ffi/gtk-ffi-impl.lisp (I removed the extra code for sbcl by renaming
> #+sbcl to #+sbcl2):
>
>  (defun lisp-to-utf-8 (str)
>   #-(or clisp sbcl2) (return-from lisp-to-utf-8 str)
>   (when str
>     #+clisp (ext:convert-string-to-bytes str charset:utf-8)
>     #+sbcl2 (sb-ext:string-to-octets str :external-format :utf-8)))
>
> (defun utf-8-to-lisp (str)
>   #-(or clisp sbcl2) (return-from utf-8-to-lisp str)
>   (when str
>     (let* ((nat (lisp-to-utf-8 str))
>            (oct (coerce (loop for i from 0 below (length nat)
>                            for b = (aref nat i)
>                            collect b
>                            ;; ph: gtk gives us 4 bytes per char ; why ?
>                            if (= b 195) do (incf i 2))
>                         '(vector (unsigned-byte 8)))))
>       #+clisp (ext:convert-string-from-bytes oct charset:utf-8)
>       #+sbcl2  (sb-ext:octets-to-string oct :external-format :utf-8))))
>
> Now the test application runs, but when I press the last tab "Drawing" the
> program aborts with:
>
> [...]
> 0> TX> "initialize-instance :after" :self window472 :|(id self)|
> #.(sb-sys:int-sap #x082a1240)
> 0> TX> "initialize-instance :after" :self window473 :|(id self)|
> #.(sb-sys:int-sap #x082a12e0)
> debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread"
> RUNNING {A6E5719}>:
>   Error during processing of --eval option (LOAD #P"test.lisp"):
>
>   The function CELLS-GTK::CONTEXT is undefined.
>
> Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
>
> restarts (invokable by number or by possibly-abbreviated name):
>   0: [CONTINUE] Ignore and continue with next --eval option.
>   1: [ABORT   ] Skip rest of --eval options.
>   2:            Skip to toplevel READ/EVAL/PRINT loop.
>   3: [QUIT    ] Quit SBCL (calling #'QUIT, killing the process).
>
> ((FLET #:LAMBDA135) #<UNDEFINED-FUNCTION CONTEXT {A95CDF9}>)
> 0] backtrace
>
> 0: ((FLET #:LAMBDA135) #<UNDEFINED-FUNCTION CONTEXT {A95CDF9}>)
> 1: ((FLET #:LAMBDA135) #<UNDEFINED-FUNCTION CONTEXT {A95CDF9}>)[:EXTERNAL]
> 2: (SIGNAL #<UNDEFINED-FUNCTION CONTEXT {A95CDF9}>)[:EXTERNAL]
> 3: (ERROR UNDEFINED-FUNCTION)[:EXTERNAL]
> 4: (SB-KERNEL::UNDEFINED-FUN-ERROR-HANDLER
>     #<unavailable argument>
>     #.(SB-SYS:INT-SAP #XB79BE020)
>     #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #XB79BDD1C :TYPE (*
>                                                             (SB-ALIEN:STRUCT
>
> SB-VM::OS-CONTEXT-T-STRUCT))>
>     (14))
> 5: (SB-KERNEL::UNDEFINED-FUN-ERROR-HANDLER
>     #<unavailable argument>
>     #.(SB-SYS:INT-SAP #XB79BE020)
>     #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #XB79BDD1C :TYPE (*
>                                                             (SB-ALIEN:STRUCT
>
> SB-VM::OS-CONTEXT-T-STRUCT))>
>     (14))[:EXTERNAL]
> 6: (SB-KERNEL:INTERNAL-ERROR
>     #.(SB-SYS:INT-SAP #XB79BDD1C)
>     #<unavailable argument>)
> 7: ("foreign function: call_into_lisp")
> 8: ("foreign function: funcall2")
> 9: ("foreign function: interrupt_internal_error")
> 10: ("foreign function: handle_trap")
> 11: ("bogus stack frame")
> 12: (CELLS-GTK::CAIRO-DRAWING-AREA-DRAW DRAW)
> 13: ((LAMBDA (CELLS-GTK::GTK-POINTER SIGNAL CELLS-GTK::DATA))
>      #.(SB-SYS:INT-SAP #X08237D98)
>      #<unavailable argument>
>      #<unavailable argument>)
> 14: ((LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION))
>      -303630245
>      -303630249
>      #<FUNCTION (LAMBDA #) {A72842D}>)
> 15: ("foreign function: call_into_lisp")
> 16: ("foreign function: funcall3")
> 17: ("foreign function: #x1101858")
> 18: ("foreign function: _gtk_marshal_BOOLEAN__BOXED")
> 19: ("foreign function: g_closure_invoke")
> 20: ("foreign function: #xB6E43213")
> 21: ("foreign function: g_signal_emit_valist")
> 22: ("foreign function: g_signal_emit")
> 23: ("foreign function: #xB7259C78")
> 24: ("foreign function: #xB79BE5F4")
>
> 0]
>
> _______________________________________________
> cells-gtk-devel site list
> cells-gtk-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/cells-gtk-devel
>




More information about the cells-gtk-devel mailing list