p5.js version
2.3.2 (although it happens to me on many versions)
What is your operating system?
Linux
Web browser and version
151.0.7922.108 (Official Build) (x86_64)
Actual Behavior
This Error: Multiple infinite loops detected. Stopping execution
It has been appearing way too often starting sometime this summer. (I don't remember seeing it in May, but in June I feel it started) Most recently I am using an old linux computer to grade p5.js work and almost any assignments with nested loops is giving this error and not completing.
In addition I see it often on my macbook pro which is a fast computer. I have to imagine this is happening all of the time.
I tried using "// noprotect" at the top of the sketch with the hope that it would turn off loop protection, but it does not seem to do that. (although it is documented to turn off the protection). I also tried changing frameRate(1) but that did not help either (I was testing the idea that maybe the draw loop was causing infitinite loops and if i slowed it down it may help)
Expected Behavior
I expect it to run, but just a little bit slower.
When i use // noprotect I expect it to turn off infinite loop protection and run without errors.
Considering p5.js and the P5 editor are intended to be the most accessible coding platform, it should work reasonably well for older computers. My computer is not that old, but it is kind of slow. The p5 web editor just does not work with this computer.
Steps to reproduce
// noprotect
// Note run this on a slower computer, in my case a Linux laptop and it will give the error
let z = 0;
function setup() {
createCanvas(400, 400);
colorMode(HSB, 360, 100, 100);
noStroke();
}
function draw() {
background(0, 0, 90);
z += 0.01;
for (let x = 0; x < width; x += 5) {
for (let y = 0; y < height; y += 5) {
let n = noise(x / 100, y / 100, z);
fill(n * 360, 75, 95);
square(x, y, 5);
}
}
}
p5.js version
2.3.2 (although it happens to me on many versions)
What is your operating system?
Linux
Web browser and version
151.0.7922.108 (Official Build) (x86_64)
Actual Behavior
This Error: Multiple infinite loops detected. Stopping execution
It has been appearing way too often starting sometime this summer. (I don't remember seeing it in May, but in June I feel it started) Most recently I am using an old linux computer to grade p5.js work and almost any assignments with nested loops is giving this error and not completing.
In addition I see it often on my macbook pro which is a fast computer. I have to imagine this is happening all of the time.
I tried using "// noprotect" at the top of the sketch with the hope that it would turn off loop protection, but it does not seem to do that. (although it is documented to turn off the protection). I also tried changing frameRate(1) but that did not help either (I was testing the idea that maybe the draw loop was causing infitinite loops and if i slowed it down it may help)
Expected Behavior
I expect it to run, but just a little bit slower.
When i use // noprotect I expect it to turn off infinite loop protection and run without errors.
Considering p5.js and the P5 editor are intended to be the most accessible coding platform, it should work reasonably well for older computers. My computer is not that old, but it is kind of slow. The p5 web editor just does not work with this computer.
Steps to reproduce
// noprotect
// Note run this on a slower computer, in my case a Linux laptop and it will give the error
let z = 0;
function setup() {
createCanvas(400, 400);
colorMode(HSB, 360, 100, 100);
noStroke();
}
function draw() {
background(0, 0, 90);
z += 0.01;
for (let x = 0; x < width; x += 5) {
for (let y = 0; y < height; y += 5) {
let n = noise(x / 100, y / 100, z);
fill(n * 360, 75, 95);
square(x, y, 5);
}
}
}