[Openmcl-devel] Crash on allocating new pointer

Gary Byers gb at clozure.com
Fri Jul 2 10:18:29 UTC 2004



On Fri, 2 Jul 2004, Andrew P. Lentvorski, Jr. wrote:

>
> On Jul 1, 2004, at 6:32 PM, Gary Byers wrote:
>
> > There's a call to #_gtk_init in "ccl:library;openmcl-gtk-support.lisp";
> > you might find that helpful (especially in the context of the long
> > reply
> > I sent last night.)
>
> Well, I had looked at that before, but that fact that none of the
> example code actually calls it is a bit disconcerting.
>
> However, I forged ahead and borrowed the gtk-init function and
> substituted an ff-call.  I wound up with another unhandled exception:
>
> Welcome to OpenMCL Version (Beta: Darwin) 0.14.2-040506!
> ? (setf gtk-lib (open-shared-library
> "/Users/devel/lib/libgtk-x11-2.0.dylib"))
> #<SHLIB /Users/devel/lib/libgtk-x11-2.0.dylib #x638EEEE>
> ? (setq gi (external "_gtk_init"))
> #<EXTERNAL-ENTRY-POINT "_gtk_init" (#x0152251C)
> /Users/devel/lib/libgtk-x11-2.0.dylib #x638ED86>
> ? (defun gtk-init (arg &rest args)
>    (declare (dynamic-extent args))
>    (push arg args)
>    (with-string-vector (argv args)
>      (rlet ((argvp (* t))
>             (argcp :signed))
>       (setf (%get-ptr argvp) argv
>             (%get-long argcp) (length args))
>         (ff-call (external "_gtk_init") :address argcp :address argvp))))
> GTK-INIT
> ? (gtk-init '"junk1" '"junk2")
> Unhandled exception 4 at 0x0638ed84, context->regs at #xf01356a8
> Illegal instruction (0x0600c9be) at 0x0638ed84 In foreign code at
> address 0x0638ed84
> ? for help
> [23632] OpenMCL kernel debugger:
>
> What should that ff-call look like?
>
> -a
>
>

(external-call "_gtk_init" :address argcp :address argvp)



More information about the Openmcl-devel mailing list