Skip to content

OutOfMemoryError reported by apps using processing-core #469

Open
@codeanticode

Description

@codeanticode

The "ANRs & crashes" report from Google indicate that java.lang.OutOfMemoryError come from:

A ) 60% processing.core.PApplet.loadImage
on this line:
params[0].wichArray[params[0].pImageNum] = loadImage(params[0].file);

in this class

    ///////////////////////////////////////////////////////////////////////////////
    private class BitmapWorkerTask extends AsyncTask<MyTaskParams, Void, PImage> {
        // load image in background.
        @Override
        protected PImage doInBackground(MyTaskParams... params) {
 
            params[0].wichArray[params[0].pImageNum] = loadImage(params[0].file);

            return params[0].wichArray[params[0].pImageNum];
        }

        @Override
        protected void onPostExecute(PImage result) {
            ressourceCounter++;
        }
    }
    ///////////////////////////////////////////////////////////////////////////////

B ) +- 30 % The ones that point me to a "ProGuard deobfuscation" file:

processing.opengl.PGL.allocateDirectIntBuffer
processing.opengl.Texture.loadPixels
processing.core.PApplet.loadImage
processing.core.PImage.loadPixels

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions