if e.key == K_ESCAPE:
                print(1)
                pygame.display.get_init()
                print(2)
                pygame.display.get_surface()
                print(3)
                screen.unlock()
                print(4)
                pygame.display.set_mode((16, 64))
                print(5)
                pygame.display.flip()
                print(6)
                pygame.quit()
                print(7)
                sys.exit()
                print(8)
In this sequence it's understood 8 will never be reached. When the 
program exits normally 7 is printed and the program terminates. When the 
fps gallops away, indicating the problem has occurred, the last thing 
printed is always 6 and the program hangs. In all cases the pygame 
functions return, except for pygame.quit(). When trying other exit 
routines in lieu of pygame.quit() the exiting statement hangs, I presume 
because pygame's cleanup is called.
Gumm On 6/28/2014 05:29, Sam Bull wrote:
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 ifthat 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.