FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SDL Error on program exit.

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
wyverex



Joined: 09 Feb 2008
Posts: 2

PostPosted: Wed Feb 09, 2011 11:03 am    Post subject: SDL Error on program exit. Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group