Crash On Sdl_Quit()


kyuu

Still Fresh
Joined
Sep 7, 2011
Messages
30
Hi, I have a Caanoo with 1.6.1 firmware here. I'm using the official SDK (10.12.01) to compile and link the following program:

Code:
#include <SDL/SDL.h>
#include <cstdio>

int main(int argc, char* argv[])
{
    printf("initializing sdl...\n");
    SDL_Init(SDL_INIT_EVERYTHING);
    printf("quitting sdl...\n");
    fflush(stdout);
    SDL_Quit();
    printf("the end\n");
    return 0;
}

The issue is, "the end" is never written to stdout because apparently SDL_Quit() crashes.

I can't imagine that GPH would include a broken SDL library in their SDK, so could it be the firmware which is incompatible with the SDK?
 

scachi

Still Fresh
Joined
Dec 28, 2005
Messages
451
Your code segaults for me too at SDL_Quit.
If I add this to your code

Code:
SDL_Surface *sdl_screen;
sdl_screen = SDL_SetVideoMode(320,
                                  240,
                                  16,
                                  SDL_SWSURFACE);
SDL_Quit() isn't crashing anymore.

Both version do not crash on my linux system so maybe it is a problem of gph's SDL lib ?

I have a Caanoo with 1.6.1 firmware, too.
 

kyuu

Still Fresh
Joined
Sep 7, 2011
Messages
30
scachi: Thanks for testing! To be sure that the culprit really is GPH's SDL I just compiled SDL myself and in fact the new library doesn't crash anymore on SDL_Quit(). It still crashes when trying to set a video mode with bpp bigger than 24 or a resolution bigger than 320 x 240, but this is probably due to buggy video drivers.
 
Top