[plt-scheme] mred + OpenGL crashes

From: dave (dave at pawfal.org)
Date: Mon Jan 22 16:32:49 EST 2007

Hi all,

I have some questions about OpenGL use in mred, I'm new to PLT, so
hopefully this is something I've overlooked or I'm being silly. I'm
running version 352 on linux (ubuntu breezy), but I get reports of the
same problems on OSX too.

Firstly it seems that all of the OpenGL examples crash drscheme if they
are run more than once. Is this the same for everyone else? 

Secondly, I'm getting a lot of memory corruption in binary extensions
that use OpenGL functions when loaded into mred. I've reduced this down
to a trivial example I can post if required - but I *think* I know
what's happening already.

The reason for this is that I have also embedded mzscheme into a glut
application, and I had similar (although not quite so severe) problems.
I tracked this down to the fact I was calling load-extension after
initialising and setting up the glut window. Putting the load-extension
call before any other OpenGL related setup fixed the problem completely.
Presumably this is a dlopen linking order issue, maybe there are linking
flags I need to set?

With mred, I'd like to call my load-extension in .mredrc, but this
doesn't help, and looking at the source for mred, it looks like
the .mredrc init script gets called after the windowing system is
initialised - although I'm not 100% sure on that.

Has anyone hit these problems already? Is it possible to set an init
script to be called very early for these reasons, or is that not the
real fix? 



Posted on the users mailing list.