[Openmcl-devel] Re: [lambda-gtk-devel] Bug in examples.lisp

rm at fabula.de rm at fabula.de
Tue Dec 7 04:37:57 PST 2004


On Sun, Dec 05, 2004 at 03:18:46PM -0700, Gary Byers wrote:

> >  - rewrote 'ccl:library/openmcl-gtk-support.lisp' into 'ccl:library/openmcl-gtk2-support.lisp'
> >    (BTW, is the installation of the gtk-task with def-load-pointers really neccessary?
> >     Is there no better way to run the gtk-main loop in a dedicated thread?).
> >
> 
> That example's extremely old; in the old (OpenMCL <= 0.13) cooperatively-
> scheduled days, running GTK+ (or Cocoa, or ...) event loops a little at
> at time in a periodic task was about the only way to run them at all.
> 
> If you do:
> 
> ? (process-run-function "GTK Event Loop" #'(lambda () (#_gtk_main ...)))
> 
> does it still crash ?  [OK, I read what you say below, and I guess
> that it does.]

Yes, unfortunately it does.

> I think that once the cause of the crash is determined you'd want
> to just run the GTK event loop (and all callbacks) in a dedicated
> thread.

Yes, i changed my code to use a dedicated GUI thread.

> Note that GTK2 is supposed to be "thread aware, but not thread-safe";
> IIRC, there's a global lock that any thread that touches a GTK data
> structure has to acquire before doing so.  The exact mechanism it's
> supposed to use is buried in several C preprocessor macros; I think
> that I once decoded them and found the actual locking primitive and
> how to find the actual lock object, but didn't write that down ...
> 
> In any case: I can't tell too much from the backtrace below.
> What would I need to do to be able to reproduce this ?

Hmm, probably just my interface stuff? I'm currently working on
making the populate.sh script more plattform agnostic (probably even
merging it with Rick Taube's Darwin version). I guess OpenMCL currently
doesn't use any build too like autoconf or similar? I guess i might come
back soon with some h-to-ffi questions :-)
I can put the stuff on a webserver/public cvsview together with my test
case.

BTW, in an other post you mention work on a gcc-3.n based ffigen. Is this
in CVS allready?

 TIA 

   RalfD



More information about the Openmcl-devel mailing list