NullPointerException when calling save() after surface.setSize() in P2D

I’m guessing here (because you didn’t share the code that caused this), but my guess is that you put background() in setup, then you put ellipse in draw and let it run. Don’t do that if you want antialiased edges – if you draw transparent pixels over and over and over again, after a few dozen frames they white-out. Instead, put background in draw if you intend to composite antialiased shapes.

You can set your frameRate low to watch it happen over ~30 seconds.

void setup(){
  background(0);
  noStroke();
  frameRate(4);
}
void draw(){
  ellipse(50, 50, 20, 20);
}

Or better you can just draw the same ellipse many times manually to see what happens over time:

void setup(){
  size(200, 100);
  background(0);
  noStroke();
  noLoop();
}
void draw(){
  ellipse(20, 50, 20, 20);
  for(int i=0; i<4; i++) ellipse(50, 50, 20, 20);
  for(int i=0; i<20; i++) ellipse(80, 50, 20, 20);
  for(int i=0; i<120; i++) ellipse(110, 50, 20, 20);
}