[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Help with problem involving GC mixing C/Scheme
From: |
Alejandro Forero Cuervo |
Subject: |
[Chicken-users] Help with problem involving GC mixing C/Scheme |
Date: |
Sat, 7 May 2005 13:19:34 -0500 |
User-agent: |
Mutt/1.5.6+20040907i |
Hello.
Some of my code that involved calling Scheme code from C recently
started crashing (probably because the input it handles grew
significantly). After investigation, I managed to isolate the error;
the following program reproduces it:
;--- begin ---
(use format)
(define-external (funccall (scheme-object func)) void (func))
(define run
(foreign-callback-lambda* void ((long n) (scheme-object func))
"while (n--) funccall(func);"))
(run 1000000 (lambda () format #t "~%"))
;--- end ---
When I use Chicken 1.935 to build this program and run it, I get:
> Error: call of non-procedure: error in error
Interestingly, if I (set-gc-report! #t), a garbage collection is shown
right before the error.
Could anybody please point out what am I doing wrong? Or is this a
problem in Chicken?
Thanks!
Alejo.
http://bachue.com/alejo
---=( Comunidad de Usuarios de Software Libre en Colombia )=---
---=( http://bachue.com/colibri )=--=( address@hidden )=---
- [Chicken-users] Help with problem involving GC mixing C/Scheme,
Alejandro Forero Cuervo <=