Skip to content

pygame.display.set_mode runs out of memory #331

@gunsmoker70

Description

@gunsmoker70

I'm able to build python-for-android and the touchtracer demo works fine for me.
However, when I try an application that uses pygame, I get an "Out of memory error" in the logcat upon the pygame.display.set_mode statement to set the screen resolution which is close to the beginning of the program after the pygame.init statement. I don't have this problem with the pygame subset for android (PGS4a-0.9.6) and when running python/pygame on Windows or RaspberryPi.
I need to build python-for-android myself in order to include the openssl package which PGS4A does not include.

I tried various things - NDK 8c, 9, 10d, Android API levels 14, 20, JDK 1.8.0, cython 0.20 with no success. I built on a debian x86 machine updated to the latest stable level.
I get the same problem whether I specify openssl, pil, and kivy modules as in the README.txt file or android, pygame, and pyjnius modules to build.

I tried tracing that out-of-memory message and if I'm not incorrect, it's coming from one of the camera C files in pygame where it tries to calloc a buffer during some initialization. I don't need camera support and I intend to comment out the camera initialization to see if it will get any further.

Any help will be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions