[cells-gtk-devel] can't run testprogram
Martin Kielhorn
kielhorn.martin at googlemail.com
Thu Oct 23 09:04:02 UTC 2008
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]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cells-gtk-devel/attachments/20081023/400bd160/attachment.html>
More information about the cells-gtk-devel
mailing list