[SDL] EXC_BAD_ACCESS on SDL_ConvertSurface Mac OS X
Albert Zeyer
albert.zeyer at rwth-aachen.de
Sat Mar 8 14:48:23 PST 2008
Am Samstag, den 08.03.2008, 11:12 -0800 schrieb thecommodore6:
> // Load tiles.bmp into the temp surface, then convert it to
> the format of
> gScreen and save it to gTiles, then free the temp surface
> SDL_Surface *temp = SDL_LoadBMP("tiles.bmp");
> gTiles = SDL_ConvertSurface(temp, gScreen->format,
> SDL_SWSURFACE);
> SDL_FreeSurface(temp);
>
> return 0;
> }
>
> All this does is load a .bmp, convert it, save it to a new surface,
> then
> free the temp surface and exit. Unfortunately when I run this all it
> does
> is hang. When I step through it in the debugger I then get the
> EXC_BAD_ACCESS error.
>
At which line do you get this error?
Is temp != NULL after SDL_LoadBMP ?
Is gTiles != NULL after SDL_ConvertSurface ?
More information about the SDL
mailing list