[cl-opengl-devel] CL-GLUT bug with saving a core

Charlie McMackin charliemac+cl-opengl at gmail.com
Thu May 1 11:28:23 UTC 2008


Dear list,

Long time no hear ;)  Today I believe I've run into what might be a
bug with cl-glut while trying to SAVE-LISP-AND-DIE on sbcl 1.0.15.
Running a core saved with cl-glut  and my program resulted in freeglut
errors like:

freeglut  ERROR:     Function <glutCreateWindow> called without first
calling 'glutInit'.

 _3b on #lisp (Bart B?)  though (glut:init) might need to be called on
when the core is loaded. When I tried this I got dumped to ldb
immediately with illegal pointer errors. I am unsure of the quality of
my fix, but I added the following to my :toplevel function and
everything worked.

(eval-when (:load-toplevel :execute)
   (setf glut::*argcp* (cffi:null-pointer)
	 glut::*argv* (cffi:null-pointer))
   (glut:init))

Saving the core also saves the pointer values of *argcp* and *argv* at
the time of saving. If this is The Right Way, I can try writing it up
to be put in init.lisp proper...


Charlie Mac



More information about the cl-opengl-devel mailing list