[SDL] DGA mode sometimes kills X when freeing the screen

James Gregory jamesg at f2s.com
Wed Apr 14 12:36:07 PDT 2004


Perhaps one out of ten times that I run my program in DGA mode X will die
when SDL_Quit() is called.

By "X dies" I mean, I am returned to the console, except:

1. The console only occupies the top 1/5 of the screen, and hence the text
is so stretched it is totally unreadable. The console text is also bright
green, I assume something to do with the fact that my game changes the
screen depth from 32 bit to 16 bit.

and

2. The bottom 4/5 of the screen is a very mangled version of the last
thing my game left in video memory

Typing "startx" succesfully restarts X and the screen goes back to normal.

However, once this bug has occured then my game kills X on calling
SDL_Quit() every single time it is run, until I restart my computer at
which point it returns to having about a 1 in 10 chance of happening each
time.

On a couple of occasions I have reproduced this bug in a different way: by
trying to run my game in DGA mode without root permissions. Normally this
causes SDL_setVideoMode to segfault and returns gracefully to the console,
but again maybe 1 in 10 times or similar this has the effect of killing X
and leaving you with a console squeezed into the top 1/5 of the screen
with bright green text.

Is there some way I might help find out exactly what is causing this?

	James





More information about the SDL mailing list