I’ve got a problem with crashing in full screen mode in Windows 2000. It
doesn’t crash in windowed mode, though. Playing around a lot, I finally
narrowed it down to this minimal example reproducing it:
SDL_Surface *intro, *temp;
temp = IMG_Load(“images/intro.png”);
assert(temp);
intro = SDL_DisplayFormat(temp);
assert(intro);
SDL_FreeSurface(temp);
SDL_SetAlpha(intro, SDL_SRCALPHA, 128);
SDL_BlitSurface(intro, NULL, screen, NULL);
SDL_FreeSurface(intro);
It crashes in the last line (the SDL_FreeSurface(intro)).
MSVC dumps this in the debug window:
HEAP[test.exe]: Invalid Address specified to RtlFreeHeap( 900000, abba00 )
It also doesn’t crash if I remove the SDL_BlitSurface() call above. So the
blit is transforming the surface in some way that it can’t be freed withing
crashing in fullscreen mode (hardware surface, double buffer).
Sure sucks trying to debug full screen SDL apps that crash!
-Jason
Jason Hoffoss wrote:
SDL_BlitSurface(intro, NULL, screen, NULL);
SDL_FreeSurface(intro);
what if you stick an SDL_Flip(screen); before the SDL_FreeSurface…
also, how about an SDL_Quit() at the end…
and also, assertion failures may not call SDL_Quit, which would be ugly…assert is already ugly enough…–
-==-
Jon Atkins
http://jcatki.2y.net/
Hello!
And when it crashes, I can’t see anything because DirectX
has the screen. I have to hit enter (to close the
dialog stating what the error was, but unfortunately, I don’t
get to know what),
…because you don’t get to see the message box?
Perhaps you can capture it by pressing Alt-Print
and then paste it into a painting application.
Ciao,
Eike
RE: [SDL] Crashing problemHeh, I tried that, but just got a nice capture of the DirectX screen I was already looking at.
-Jason----- Original Message -----
From: eike Sauer
To: sdl at libsdl.org
Sent: Monday, March 18, 2002 10:09 AM
Subject: RE: [SDL] Crashing problem
Hello!
And when it crashes, I can’t see anything because DirectX
has the screen. I have to hit enter (to close the
dialog stating what the error was, but unfortunately, I don’t
get to know what),
…because you don’t get to see the message box?
Perhaps you can capture it by pressing Alt-Print
and then paste it into a painting application.
Ciao,
Eike
At 10:29 3/18/2002 -0500, you wrote:
Heh, I tried that, but just got a nice capture of the DirectX screen I was
already looking at.
If the message box has the focus you can just press the ordinary
Ctrl+C (Copy to clipboard) and paste it somewhere.
Regards,
Dimitri>> > And when it crashes, I can’t see anything because DirectX
has the screen. I have to hit enter (to close the
dialog stating what the error was, but unfortunately, I don’t
get to know what),
…because you don’t get to see the message box?
Perhaps you can capture it by pressing Alt-Print
and then paste it into a painting application.
I’ve got a problem with crashing in full screen mode in Windows 2000. It
doesn’t crash in windowed mode, though. Playing around a lot, I finally
narrowed it down to this minimal example reproducing it:
Does this happen with the latest CVS source?
http://www.libsdl.org/cvs.html
Make sure when you build the DLL that you copy it into the right directory
for testing.
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
Ctrl+PrScr gives you the entire screen.
Alt+PrScr gives you the window that has focus.
However even Alt+PrScr won’t help if the current window is obscured by an
"Always on top" window (e.g. by the DDraw window). It just gives you the
"visible" screen but clipped to the rect of the active window.
I had a handy program for dumping the text of all windows into a file; you
can write one yourself in 10 lines (recursively enumerate all child windows
starting with the desktop and dump everything to a nicely indented file that
gives you the window text/caption for every window – this way you’ll see
the dialog as well as the stuff it contains).
Ctrl+C won’t do anything.
V.> >Heh, I tried that, but just got a nice capture of the
DirectX screen I was
already looking at.
If the message box has the focus you can just press the ordinary
Ctrl+C (Copy to clipboard) and paste it somewhere.