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

Re: [pygame] This program breaks on my Linux



On ven, 2014-06-27 at 22:35 -0700, bw wrote:
> I attached the small program. I'm curious if anyone can run it and 
> reproduce the problem. I plan on upgrading Ubuntu soon, when I am ready 
> to risk it: maybe the problem will go away. I'll post the outcome--but 
> I've been too busy to risk the upgrade, so don't hold yer breath. =)

No idea what the problem could be. I can't reproduce it, but also not
getting more than 130 FPS on my old laptop. I'm curious as to exactly
when it crashes though, can you add some print statements to find
exactly where it crashes?

        if e.key == K_ESCAPE:
            print("Before")
            pygame.quit()
            print("After Pygame exit")
            quit()
            print("Never reached")
        
I'd also experiment with a couple of different exit functions, to see if
that makes any difference. For example, try removing the pygame.quit()
call (Pygame will exit safely with Python anyway, so it's a redundant
call here), and using sys.exit() instead of the builtin.

Attachment: signature.asc
Description: This is a digitally signed message part