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

I confirm I can reproduce this issue when using Windows 10.

Quick notes:

  • If you remove exit() when using the P2D, it works but you get the last picture that you show above which seems to be a bug.
  • If you remove both resize and exit, it works as intended

My advise: Don’t call exit or resize the way you do.

Second advise: Create a github issue in the Processing repo to report this problem. I would say it is a bug and it should be documented and hopefully somebody will address it.

Kf

1 Like