[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] crashes during return-from-callbacks
From: |
Daniel B. Faken |
Subject: |
[Chicken-users] crashes during return-from-callbacks |
Date: |
Wed, 7 Sep 2005 15:08:49 -0400 (EDT) |
Hi,
I've been working on this for a few days, but can't seem to make any
progress...
I'm making callbacks via C_callback() into a closure created by eval'd
code. SOMETIMES when I return the value back to C, I get a crash in some
subroutine called by C_do_apply() when the eval'd fn is returning...
Its been very hard to track down what is causing this; all I can say is
that it is affected by calls to (print) in the called-back scheme
function. Specifically, if I print some of the parameters I'm passing via
C_callback(). But the function doesn't crash during the printing -- only
after it reaches the second-to-last statement (which generates output, so
I know it is called). The last statement just returns the value.
(This is after calling CHICKEN_run(C_toplevel) and after saving the
input params via C_save()).
Any ideas? I looked at the code in eval.scm, to no avail.. One thing I
don't understand is which functions C_do_apply() call -- where are these
4/5/6/7/8/../126 -parameter functions defined for functions created in
eval'd code? (I presume there are generic versions that just make a
list of the N parameters and pass these lists to (apply) or something).
I compile with debugging, with the debug-module turned on, and have also
tried tracing, also to no avail.
I've been using both yesterday's darcs head and the 2.106 release.
any help appreciated... I suspect its related to GC, but have no proof
of this. :)
Are there any secret options for debugging the compiler/evaluator? :)
The next thing I can think of is just compiling the whole enchilada with
-g... yikes.
thanks,
Daniel