[SDL] Troubles SDL_UpdateRect()

Leo M. Cabrera leo28c at gmail.com
Wed May 30 13:01:05 PDT 2007


>
> SDL_UpdateRect(screen,0,0,0,0);
As far as I can remember, that just makes SDL not handle the crash, but 
it still crashes. xD
But I could be wrong...


Zakariae El-Abdelouarti Alouaret wrote:
> Hello all!!!
> I'm new with SDL.
> I've been trying to do something extremely simple, so i started to show 
> an image in my screen, easy...
> But when a tried to do the same thing in C++,(the previous thing is done 
> in plane C), i get troubles.
>
> I have that:
>
> class Painter{
> 	public:
> 	painter();	//Here a put all the functions that starts SDL
> 	~painter();	//SDL_Quit()
> 	void showImage();	//All needed to show the image.
> 	
> 	private:
> 	SDL_Surface *screen;
> };
>
> When a execute this one, that's what i get:
> The window is pops up and the "full screen mode" too. But when it goes 
> to SDL_UpdateRect() it crashes and send me that:
> Fatal signal: Segmentation Fault (SDL Parachute Deployed)
>
> -->I have checked that if you put in the parameters of 
> SDL_UpdateRect(screen,0,0,0,0); it does not crash.
>
> -->I have checked also that if you change the prototype of showImage 
> that way--> void showImage(SDL_Surface *screen); it does not crach either.
>
> My question is:
> Is there any trouble in my programing?
> is there any bug not yet debugged in SDL?
>
> PD:If anyone wants i can post the whole source
>
> Thnks a lot.
>
> Shanatos.
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>   



More information about the SDL mailing list