1
# 1 - Import library
import time
import pygame
from pygame.locals import *


# 2 - Initialize the game
pygame.init()
width, height = 640, 480
screen = pygame.display.set_mode((width, height))


background = pygame.image.load("resources/images/forest.png")




while True:


    # 5 - clear the screen before drawing it again
    screen.fill(0)


    # 6 - draw the basic screen elements

    screen.blit(background,(0,0))


    # 8 - update the screen
    pygame.display.update()



    time.sleep(0.5)

When I run this I get Process finished with exit code 139 (interrupted by signal 11: SIGSEGV).

Is this something to do with not having enough RAM? Or maybe the 32bit version of python?

Also removing the loop entirely produces the same exit code.

# 1 - Import library
import time
import pygame
from pygame.locals import *


# 2 - Initialize the game
pygame.init()
width, height = 640, 480
screen = pygame.display.set_mode((width, height))


background = pygame.image.load("resources/images/forest.png")




# 5 - clear the screen before drawing it again
screen.fill(0)


# 6 - draw the basic screen elements
screen.blit(background,(0,0))


# 8 - update the screen
pygame.display.update()

time.sleep(0.5)
user3519870
  • 91
  • 2
  • 10
  • Maybe this helps a little bit: [`errno.errorcode[139]`](https://docs.python.org/3/library/errno.html#errno.errorcode) reveals that this is [`ETXTBSY`: "Text file busy"](https://docs.python.org/3/library/errno.html#errno.ETXTBSY). *Edit*: maybe have a look [here](http://stackoverflow.com/questions/31074240/process-finished-with-exit-code-139-after-updating-from-python-2-7-6-64-bit-to-2). – Christian König Apr 26 '17 at 10:07

0 Answers0