Skip to content

OutOfMemory error when opening/closing a PFragment with an OpenGL sketch #482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
codeanticode opened this issue Aug 8, 2018 · 1 comment

Comments

@codeanticode
Copy link
Contributor

It happens in the saveState() method:

    java.lang.OutOfMemoryError: Failed to allocate a 7387216 byte allocation with 4786600 free bytes and 4MB until OOM, max allowed footprint 201326592, growth limit 201326592
        at processing.opengl.PGraphicsOpenGL$1.run(PGraphicsOpenGL.java:5717)
        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1500)
        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)

when saving the pixels. This may be pointing to some renderer's resources not properly disposed, either the pixels or something else..

@codeanticode
Copy link
Contributor Author

Fixed by saving the pixels to a cache file 3e3df3d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant