While writing a simple game using SBCL, CL-OPENGL, and Lispbuilder-SDL, I can across a strange error. Soon after I got the game working, I decided to clean out all my debugging cruft (print statements, etc). I did so, but when I ran the game afterwards I received the message “Aborted” and my entire Lisp process died, with no other error message and no debugger prompt. Using print statements I managed to isolate the problem to a call to gl:translate. The strange thing is, if I put a break statement before that line and attempt to single-step, I receive no error and the code runs fine. Seems like a race condition almost, but I’m not using threads. Any ideas?
EDIT: It appears that the call to gl:translate isn’t the problem. If I do something like the following:
(print 'first)
(print 'second)
(gl:translate ...)
I get the output
FIRST
Aborted
Like I said, I’m not using threads.
EDIT 2:
It works in CLisp.
EDIT 3:
Nevermind, it doesn’t.
I fixed it by switching back to pure SDL, which is disappointing, but it works.