[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Another blitting surface to itself crash



To add to the confusion the attached C program prints "Success." (to stdout.txt) with the MinGW built SDL.dll 1.2.13 provided with Pygame.

Lenard


René Dudfield wrote:
A summary of what has been found out so far:

* it doesn't seem to crash on linux/osx.
* It never crashed for SDL 1.2.7 through 1.2.9 (but crashes with 1.2.9
build Lenard made)
* For SDL 1.2.10 and 1.2.11 it crashes after like 2-6 passes, and it
crashes in the blit from surface to screen
* for SDL 1.2.12 and 1.2.13 it crashes immediately on first blit of a
surface to itself, everytime
* crashes with windib, and directx drivers.
* works with a replacement 1.2.13 SDL.dll built with MSVC by brian.
* crashes with assembly disabled.
* -O compilation also fails.
* 1.2.9 SDL fails for Lenard, built with mingw.



#include "SDL.h"
#include <stdio.h>

int main(int argc, char *argv[])
{
  SDL_Surface *s = 0;
  SDL_Rect r = {0, 0, 10, 10};

  s = SDL_CreateRGBSurface(SDL_SWSURFACE, 10, 10, 32, 0xFF0000, 0xFF00, 0xFF, 0);
  if (!s)
    {
      printf("Surface creation failed.\n");
      return 1;
    }

  if (SDL_BlitSurface(s, &r, s, &r) == -1)
    {
      printf("Blit failed.\n");
      return 2;
    }

  printf("Success.\n");
  return 0;
}