I setup a program that does nothing but initialize then screen, but yet
it core dumped. I added a putpixel function I wrote followed by an
SDL_WaitEvent. It will put the pixel to the screen, but after I cause an
event it still core dumps. (by the way is the mouse moving an event?,
the program dump core if I move the mouse)
I have SDL_Quit at the end and with an atexit statement but that isn’t
helping. This is becoming a problem because I wrote functions to draw
some graphics primitives, but sometimes for no apparent reason things
don’t get drawn, for example my rectangle drawing statement which is
simply four calls to a line drawing function, draws the top and left
side, but not the right and bottom sides. My code seems to be right, but
it might not be. With SDL being so unstable I don’t know whose at fault.
Also my PutPixel routine has a simple clipping check that just returns
without drawing anything if X or Y is out of bounds, yet if I try to
draw a line or rectangle or something that is out of bounds, none of it
gets drawn at all. This confuses me because I would think either the
clipping function wouldn’t work and it would crash the program if you
try to draw out of bounds or the clipping function would work and
everything would get drawn. I mean, If I don’t even try to draw an out
of bounds pixel until the end of the line, why isn’t the beginning of
the line being drawn. (It works fine if everything is in bounds)
Anyhow I’ve babbled enough, I’d really appreciate some help getting the
needless core dumps to stop, all I have done is initialize the display,
that can’t possibly be my fault. Strangely though, I compiled testbitmap
and it doens’t dump core.