[plt-scheme] Crash when using FFI callbacks.

From: K.S.Sreeram (sreeram at tachyontech.net)
Date: Fri Aug 10 02:41:21 EDT 2007

[PLT v370, WinXP]

Hi,

I've attached a very small C library and corresponding Scheme FFI code
which results in MzScheme crashing when using more than _one_ FFI callback.

The crash was happening at seemingly random times, until I added a call
to 'collect-garbage' in the callback procedure (as suggested by Eli
Barzilay on #scheme). Now, the crash occurs instantly.

Is there any workaround to avoid this crash? Or am I using the FFI
library incorrectly?

Thanks in advance!
[sreeram;]
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mylib.c
URL: <http://lists.racket-lang.org/users/archive/attachments/20070810/0bc67df6/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile
URL: <http://lists.racket-lang.org/users/archive/attachments/20070810/0bc67df6/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mylib.ss
URL: <http://lists.racket-lang.org/users/archive/attachments/20070810/0bc67df6/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test-mylib.scm
URL: <http://lists.racket-lang.org/users/archive/attachments/20070810/0bc67df6/attachment-0002.ksh>

Posted on the users mailing list.