You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A recursive runaway function that will normally error when entered directly, does not error when enclosed in an environment supplied ('special') function. Example code:
mouseClicked = function(){
var z = 0;
fill(0);
var stackKiller = function(){
background(255);
text(z++, 20, 20);
stackKiller(); // recursive error
};
// kaboom!
stackKiller();
};
Clicking on the mouse in that program should produce an error, but does not (currently).
If you move the above mouseClicked code to outside of the mouseClicked function, the expected 'maximum stack size exceeded' error will be reported. This seems to be true for all environment functions except the draw function which does report the error. MouseClicked, mousePressed, mouseDragged, keyPressed, were all tested and exhibited this same behavior.
The text was updated successfully, but these errors were encountered:
Original report from Larry Serflaten: https://support.khanacademy.org/hc/en-us/community/posts/360078034731-Bug-Report-Programming-environment-Maximum-stack-size-NOT-exceeded
A recursive runaway function that will normally error when entered directly, does not error when enclosed in an environment supplied ('special') function. Example code:
Clicking on the mouse in that program should produce an error, but does not (currently).
If you move the above mouseClicked code to outside of the mouseClicked function, the expected 'maximum stack size exceeded' error will be reported. This seems to be true for all environment functions except the draw function which does report the error. MouseClicked, mousePressed, mouseDragged, keyPressed, were all tested and exhibited this same behavior.
The text was updated successfully, but these errors were encountered: