On Sat, Apr 09, 2011 at 12:34:52AM +0200, Juan Jose Garcia-Ripoll wrote:
> What you had is a lisp problem, not a C problem. If you want clever error
> handling, then write it in lisp:
> http://article.gmane.org/gmane.lisp.ecl.general/4445/match=my+safe+eval

I'm having few problems with that approach, (asdf:load-system :craftd)
with that safe eval doesn't work at all, pretty printing the error
gives #<a UNDEFINED-FUNCTION>. I'm pretty new to LISP so bear with my
noobness please.

> Have you tried moving those calls inside  cdcl_EventDispatcher ?
> From
> https://github.com/meh/craftd/blob/master/scripting/lisp/main.c
> I do not really see that those functions are called from the main thread
> under equal conditions (stack depth, memory, etc). This may perturb the
> garbage collector.

If I put the thread stuff in cdcl_EventDispatcher I get a segfault on
ecl_release_current_thread(). Here's the backtrace with ecl in debug
mode if it can be of any help. It's clearly receiving a NULL lock for
some kind of reason.

> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7ffff7fce700 (LWP 7814)]
> 0x00007fffef6d3de0 in mp_giveup_lock (lock=0x0) at 
> /var/tmp/portage/dev-lisp/ecls-11.1.1-r1/work/ecl-11.1.1/build/ecl/object.h:1055
> 1055    
> /var/tmp/portage/dev-lisp/ecls-11.1.1-r1/work/ecl-11.1.1/build/ecl/object.h: 
> No such file or directory.
>     in 
> /var/tmp/portage/dev-lisp/ecls-11.1.1-r1/work/ecl-11.1.1/build/ecl/object.h
> (gdb) bt
> #0  0x00007fffef6d3de0 in mp_giveup_lock (lock=0x0) at 
> /var/tmp/portage/dev-lisp/ecls-11.1.1-r1/work/ecl-11.1.1/build/ecl/object.h:1055
> #1  0x00007fffef6d3181 in thread_cleanup (aux=<value optimized out>) at 
> /var/tmp/portage/dev-lisp/ecls-11.1.1-r1/work/ecl-11.1.1/src/c/threads/process.d:130
> #2  0x00007fffef6d38d9 in ecl_release_current_thread () at 
> /var/tmp/portage/dev-lisp/ecls-11.1.1-r1/work/ecl-11.1.1/src/c/threads/process.d:284

Thanks, meh.

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Ecls-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to