Hi! I’ve been learning to use SDL for about the last week or so, and
yesterday I discovered glSDL 0.6. For the most part it’s working
great, but I’ve encountered a couple of things that cause it to crash.
First, using the default glsdl.c and glsdl.h, I noticed that my program
would always crash during the cleanup on exit. I traced this to line
562 of glsdl.c, which looks like:
free(fake_screen);
However, because fake_screen is an SDL_Surface*, SDL_FreeSurface()
should be used, right? I changed it to:
SDL_FreeSurface(fake_screen);
With that, it works fine for me. I thought it was very odd, though,
that there was a bug this prominent; has nobody else encountered that
problem? Or is there a reason why free() was used? Also, I would bet
that the package maintainer reads this list, but if somebody can tell
me for certain that he doesn’t, let me know and I’ll forward that to
him.
Second, I’ve encountered another reproducible crash that I haven’t
found a fix for yet. The program crashes any time I blit from the
framebuffer to another surface; for a quick example:
SDL_Surface* screen, target_surface;
screen = SDL_SetVideoMode(800, 600, 32,
SDL_HWSURFACE|SDL_ANYFORMAT|SDL_DOUBLEBUF|SDL_GLSDL);
target_surface = SDL_DisplayFormat(screen);
SDL_BlitSurface(screen, NULL, target_surface, NULL);
If I run this on my WinXP box with Visual Studio .NET 2003, it crashes
every time. However, it appears to work fine on my PowerBook G4 with
OS X 10.3.4 (but there might be bad things going on in the background
that I can’t see). Both have SDL 1.2.7 installed. Any ideas?–
P. J. Reed
"If you aren’t voiding the warranty, you aren’t even trying."
http://sakabatou.net/
Hi! I’m a .sig virus! Copy me into yours and join in the fun!