Here is a minimal script to reproduce that
#!/usr/bin/env python import pygame screen = pygame.display.set_mode((640, 480)) screen.fill((255, 255, 255)) screen_half = screen.subsurface((0,0, 640/2.0, 480)) print screen.get_locks() print screen_half.get_locks() screen_half.blit(screen_half, (0, 0))
output
() () Traceback (most recent call last): File "./blit_test.py", line 10, in <module> screen_half.blit(screen_half, (0, 0)) pygame.error: Surfaces must not be locked during blit
As you can see, the lock tuples for the screen and screen_half are empty. There is no error if I use screen instead of screen_half .
source share