wyverex
Joined: 09 Feb 2008 Posts: 2
|
Posted: Wed Feb 09, 2011 11:03 am Post subject: SDL Error on program exit. |
|
|
when the sample code is run it works, when I close the app I get:
objc[39138]: FREED(id): message release sent to freed object=0x41f240
Illegal instruction
Commenting out SDL_UpdateRect makes it go away.
Any ideas?
Code: |
module test;
import derelict.sdl.sdl;
version( all ) {
pragma( lib, "DerelictSDL" );
pragma( lib, "DerelictUtil" );
}
void main()
{
DerelictSDL.load();
SDL_Init( SDL_INIT_EVERYTHING );
SDL_Surface* screen = SDL_SetVideoMode( 800, 600, 32, SDL_SWSURFACE );
SDL_Event event;
while( true ) {
if( SDL_PollEvent( &event )) {
if( event.type == SDL_QUIT ) break;
}
SDL_FillRect( SDL_GetVideoSurface(), null, 0x00000000 );
SDL_UpdateRect( SDL_GetVideoSurface(), 0, 0, 0, 0);
}
SDL_Quit();
DerelictSDL.unload();
}
|
Compiled with
Code: |
dmd main.d -L-lDerelictSDL -L-ldl
|
|
|