SDL Crashes in SDL_BlitSurface

Strange kind of problem …and "it’s moving"
after a while my program crashes in a Blit …
There is nothing special or changing involved and i dont know why it’s
happening
I can “speed” up the crash moment if i add some Blits in Timer callbacks…
but the problem remains still even if i dont use any callbacks…
im doing 2 Blits in a loop one blits the whole background and one blits a
layer of the same size colorkeyed…

Greeting and Thanxs
PeZ

Sounds like a bad pointer somewhere. They are generally almost always the
toughest bugs to fix because you see symptoms of it in unrelated places, and
that’s what I’m guess is happening here. Best protection against these sorts
of problems is very liberal use of assertions. Good luck tracking it down.On Friday 27 April 2001 09:34, you wrote:

Strange kind of problem …and "it’s moving"
after a while my program crashes in a Blit …
There is nothing special or changing involved and i dont know why it’s
happening
I can “speed” up the crash moment if i add some Blits in Timer
callbacks… but the problem remains still even if i dont use any
callbacks… im doing 2 Blits in a loop one blits the whole background
and one blits a layer of the same size colorkeyed…

Greeting and Thanxs
PeZ

Sounds like a bad pointer somewhere. They are generally almost always the
toughest bugs to fix because you see symptoms of it in unrelated places,
and
that’s what I’m guess is happening here. Best protection against these
sorts
of problems is very liberal use of assertions. Good luck tracking it
down.

it sounds like… but in my small app i dont use so much pointers …
It crashes only in FULLSCREEN… “windowed mode”-- No Problem…

ex code: (this lays in my main loop)
::the crash last time occurs in >>>
in my debug.txt it say “start bg” in the last line…

printf(“start bg\n”);
SDL_mutexP(Letter_animations_mutex);

SDL_BlitSurface(bg,NULL,Bildschirm,NULL);
SDL_mutexV(Letter_animations_mutex);
printf(“thru bg\n”);
printf(“start char_layer\n”);
SDL_mutexP(Letter_animations_mutex);
SDL_BlitSurface(char_layer,NULL,Bildschirm,NULL);
SDL_mutexV(Letter_animations_mutex);
printf(“thru char_layer\n”);