Here is some example code which displays the error:
void setup() {
size(250, 250);
print("before setup() selectOutput() runs\n");
selectOutput(); //even with this line removed, the other selectOutput() causes a problem
print("after setup() selectOutput() runs\n");
}
void draw() {
background(0);
rect(mouseX, mouseY, 10, 10); //this helps demonstrate the program ceasing to function
}
In my full code, I'm catching a particular key to perform a Save As... function. When the selectOutput() during setup() runs, all is well. When the selectOutput() called by the pressed key runs, the dialog appears, you can select a file, but upon pressing Save, the sketch freezes permanently.