Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pygame keeps quitting
#1
My pygame keeps quitting unexpectedly, please help
Here is my code:

import pygame
pygame.init()

windowSize = [400, 300]
screen = pygame.display.set_mode(windowSize)
colour = pygame.color.Color('#0A32F4')

done = False
while not done:
    pygame.draw.rect(screen, colour, [10, 20, 30, 40])
    pygame.display.flip()
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            done = True
pygame.quit()
Quote
#2
what do you mean by unexpectedly?
Quote
#3
A tab opens up and says "Pygame exit unexpectedly," not sure what to do. Just got pygame to work.

Exact message

Quote:Click Reopen to open the application again. Click Report to see more detailed information and send a report to Apple.
Quote
#4
What version of python and pygame are you using ?
import sys, pygame
print(pygame.version)
print(sys.version)
Curious. Try adding a clock or delay.
# after pygame.display.flip()
pygame.time.delay(10)
or
clock = pygame.time.Clock()
# after pygame.display.flip()
clock.tick(30)
99 percent of computer problems exists between chair and keyboard.
Quote
#5
i can say ive heard a lot of problems from users of Mac and Pygame. Anything from them having to do things such as downgrading El Captain's version sdl_image from 1.2.12 down to 1.2.10 due to a bug.

I dont know what mac version you have as i do not have a mac or keep up with their stuff. But there seems to always be an issue with macs.

Now having said that. You could of easily installed the wrong version. If your using the python2.7-32 from the other thread then i would suggest to look for a wheel of pygame for that version here
https://pypi.python.org/pypi/Pygame
I dont know if those listed for macosx are for 32 bit or 64, but you can try those.

If you have installed every possible one for mac than and still not succeed, i would put up an issue at pygame for help from them
https://github.com/pygame/pygame/issues

You can also search out previously issues with mac by searching out mac issues to see if someone says the same issue
https://github.com/pygame/pygame/issues?...C%93&q=mac
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  [PyGame] Problem importing pygame / installing pygame Klar 4 765 Dec-16-2017, 05:48 PM
Last Post: Klar
  [Pygame] Avoid SentDex pygame tutorials georgecoopers 1 959 Apr-09-2017, 12:40 PM
Last Post: metulburr

Forum Jump:


Users browsing this thread: 1 Guest(s)