renpy / pygame_sdl2

Reimplementation of portions of the pygame API using SDL2.
GNU Lesser General Public License v2.1
326 stars 64 forks source link

pygame.event.get() may make android app crash #104

Closed simonchih closed 3 months ago

simonchih commented 6 years ago

This problem can only reproduce on real android phone, e.g. ASUS zonefone 2. It can't reproduce on android emulator. I make MyGame and port to android by python script on https://github.com/renpytom/rapt-pygame-example. MyGame had below code:

for event in pygame.event.get():
                if event.type == QUIT:
                    exit()
                elif ...

I find pygame.event.get() may make android phone crash by steps below:

  1. Open MyGame app.
  2. Tap cell phone screen many times.
  3. MyGame app will closed if it's crash.

Since I replace pygame.event.get() with code below: event = pygame.event.wait()

Then MyGame app won't crash, I suspect there is a bug in pygame.event.get() and it should be critical.