p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

Running Sketch Silently Fails

Open agrow opened this issue 3 months ago • 0 comments

p5.js version

v1.11.10

What is your operating system?

Windows

Web browser and version

Firefox 143.0.1 (64-bit) Chrome 140.0.7339.186 (Official Build) (64-bit) (cohort: Stable)

Actual Behavior

The code is failing silently. I hit play and nothing shows up. No errors in the p5.js console or the browser console. Doesn't work on firefox or Chrome. Sometimes the sketch works once, but upon loading the exact same saved sketch, it no longer works.

Expected Behavior

https://editor.p5js.org/grow.april/sketches/_Wv4tWXEN -- works https://editor.p5js.org/grow.april/sketches/PZx-4k4S3 -- broken Same code

Image

Steps to reproduce

// Link to faulty sketch // https://editor.p5js.org/ssangela/sketches/msXC-mQ6n // All sketches on this student's account fail to run after closing and reopening, not sure why // Duplicating broken sketches = broken sketch // Copy-pasting broken sketch code into new sketch = working sketch sometimes

// duplicated here, testing some things, broken // https://editor.p5js.org/grow.april/sketches/PZx-4k4S3

// Identical code, works just fine // https://editor.p5js.org/grow.april/sketches/_Wv4tWXEN

function setup() { createCanvas(400, 400); }

function draw() { background(20, 24, 60);

fill(250, 250, 200); ellipse(60, 60, 40, 40);

fill(255); ellipse(50, 50, 3, 3); ellipse(100, 80, 3, 3); ellipse(150, 40, 3, 3); ellipse(250, 90, 3, 3); ellipse(300, 60, 3, 3); ellipse(350, 30, 3, 3);

fill(30, 80, 30); rect(0, 300, 400, 100);

fill(0, 200, 0); ellipse(200, 200, 150, 150);

fill(255); ellipse(200, 180, 60, 60); fill(0, 100, 200); ellipse(200, 180, 30, 30); fill(0); ellipse(200, 180, 10, 10);

stroke(0, 200, 0); strokeWeight(8); line(125, 200, 80, 160); line(275, 200, 320, 160); line(175, 275, 160, 320); line(225, 275, 240, 320);

noStroke(); fill(200, 200, 150); triangle(160, 130, 150, 110, 170, 120); triangle(240, 130, 250, 110, 230, 120);

fill(255); rect(185, 230, 10, 10); rect(195, 230, 10, 10); rect(205, 230, 10, 10);

}

agrow avatar Oct 10 '25 01:10 agrow