chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] SWIG program hanging


From: Clifford Stein
Subject: [Chicken-users] SWIG program hanging
Date: Mon, 24 Nov 2003 16:37:28 -0800

Hi,

I've been trying to port an OpenGL program to Chicken using SWIG
(1.3-19), and am having trouble with my programs hanging after a few
hundred frames.

I've tried two different approaches to port my program and am getting
similar results.  Here's what I'm doing:

Method (1)  Use OpenGL/GLUT 
1-a) I use SWIG to generate the OGL and GLUT interface
1-b) I call a C-function with:
  (define wrapper-installhandlers
    (foreign-callback-lambda void "gl:installhandlers"))
that installs my callbacks.  The callback targets themselves are defined
with:
  (define-external (callmedisplay) void (display))
so the glut display callback will call the Scheme function
'callmedisplay' which then calls the 'display' function (also scheme).
1-c) the program runs for a few hundred frames and then hangs.
1-d) gdb seems to show the program hanging in C_reclaim() 

Method (2):  Use OpenGL/SDL
2-a) I use SWIG to generate the OGL and SDL interface
2-b) I write my own poll routine to query the current event
2-c) program runs for a few hundred frames (maybe less) and then usually
hangs (again in C_reclaim())

The second program uses no callbacks, and all calls to the OGL and SDL
are using the SWIG interface.

Also, if the 2nd program doesn't display any messages while running, it
doesn't appear to hang.  However, if I display a message after drawing
each frame, the program hangs after a hundred (or few hundred) frames
(and messages).

Any suggestions?

Thanks!

--cliff







reply via email to

[Prev in Thread] Current Thread [Next in Thread]