[SDL] Troubles SDL_UpdateRect()

Zakariae El-Abdelouarti Alouaret shanatorio at gmail.com
Wed May 30 12:31:25 PDT 2007


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.


More information about the SDL mailing list