Go Down

Topic: Processing issue regarding NullPointerException (Read 333 times) previous topic - next topic

albertm26

While uploading a code, I keep on getting this "NullPointerException"

here is how this part goes :

PImage currentimage;

void display()
  {
    image(currentimage, x, y);
  }
does this happen regarding to that variable?

pert

Please do this:
  • File > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OK
  • Sketch > Upload
  • After the upload fails you'll see a button on the right side of the orange bar "Copy error messages". Click that button.
  • Paste the error messages in a reply here USING CODE TAGS (</> button on the forum toolbar).

PaulS

While uploading a code, I keep on getting this "NullPointerException"

here is how this part goes :

PImage currentimage;

void display()
  {
    image(currentimage, x, y);
  }
does this happen regarding to that variable?
Why are you asking about Processing code on the Arduino forum?
The art of getting good answers lies in asking good questions.

Grumpy_Mike

Quote
I keep on getting this "NullPointerException"
That is because the variable currentimage has not been defined / setup correctly. It is in the bit of code you have not shown us.

Go Up