FATAL EXCEPTION: GLThread error. "The pixels array is not available in this renderer..."

edited March 2 in Android Mode

I get this error on compile, any idea how to fix? I'm using the P3D renderer, but I get the same error with P2D, or the default renderer. "The pixels array is not available in this renderer withouth a backing bitmap" error regardless of which renderer I use. Also, they spelled without wrong.

FATAL EXCEPTION: GLThread 42277
Process: processing.test.myapp, PID: 18315
java.lang.RuntimeException: The pixels array is not available in this renderer withouth a backing bitmap
    at processing.a2d.PGraphicsAndroid2D.updatePixels(Unknown Source)
    at processing.test.myapp.myapp.fadeGraphics(myapp.java:624)
    at processing.test.myapp.myapp.draw(myapp.java:291)
    at processing.core.PApplet.handleDraw(Unknown Source)
    at processing.opengl.PSurfaceGLES$RendererGLES.onDrawFrame(Unknown Source)
    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1583)
    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1286)

Answers

  • Can you post an MCVE? Do you get the same error if you run a simple sketch in your device?

    Kf

  • edited March 2

    I don't get any errors running a simple sketch, what's an MCVE?

    Edit, oh - got it. I'll try to re-create the problem with a simple sketch but I'm not exactly sure what's causing it. I think it's related to using PImages.pixels

  • It takes a min of 2 minutes even for the simplest of sketch just drawing a background to compile and run, making it take a long time to troubleshoot through process of elimination. Is there any way to speed up compiling or is it just that my computer is super slow?

  • It takes a min of 2 minutes even for the simplest of sketch just drawing a background to compile and run

    Yes, this is common in Android. There is an instant run in AS that allows you to see almost instant changes of your code in your device. Nothing like that in Processing.

    Kf

  • edited March 3

    Is there a good resource which talks about what isn't supported and what needs to be changed when switching to android mode? I still haven't found the error and another sketch gives a java.lang.NullPointerException: Attempt to read from null array error, but when in Java mode I don't get any errors and it works fine.

    As far as this pixel array error. The fact that there is a misspelling in the error message leads me to believe it's not a common error and I can't find any information on it when googling.

  • Is there a good resource which talks about what isn't supported and what needs to be changed when switching to android mode?

    There is not extensive documentation AFAIK. There is some scarce information in the Processing Android website. The next source you should consider exploring is all those previous posts in the forum under the Android section. Other than that, if you have a problem, you should describe your problem and provide an example demonstrating your approach and don't forget to include any errors that you are getting.

    Kf

  • @BGADII===

    it's difficut to help you without seeing the code you are using; yet, looking to the error code i guess that your bitmap is null when you try to use loadPixels ().

  • edited March 3

    Akenaton, oh snap. I think you might be right. Let me check.

    Edit: Might have gotten too excited there. Might be right but it's hard to find.

  • edited March 3 Answer ✓

    I finally found the issue after deleting blocks of my code until I was left with nothing, it was the last thing I checked. I was calling updatePixels in a function on a PGraphics element which hadn't been drawn yet. Ugh. Kind of weird that it works fine in Java mode though. There are still errors preventing me from building the android project though.

  • @BGADII===

    that is exactly what i guessed looking to the error code...

Sign In or Register to comment.