Processing issue regarding NullPointerException

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?

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).

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?

Why are you asking about Processing code on the Arduino forum?

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.