Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen goes blank when trying to play #2296

Closed
Hiryuto opened this issue Jul 15, 2023 · 8 comments
Closed

Screen goes blank when trying to play #2296

Hiryuto opened this issue Jul 15, 2023 · 8 comments
Labels

Comments

@Hiryuto
Copy link

Hiryuto commented Jul 15, 2023

p5.js version

v1.7.0

What is your operating system?

Mac OS

Web browser and version

114.0.5735.198 (Official Build) (x86_64)

Actual Behavior

When you enter the code and press the play button,
everything disappears, including the editor, and
you get a blank screen.
This phenomenon did not occur before v2.7.0 of the Web Editor,
so we believe it is caused by the changes made in v2.7.0.

Expected Behavior

20230715-0241_00a66095ab1993e540f67a40ab154501

Steps to reproduce

The frequency with which the problem occurs is unknown, as is how to reproduce it.
It seems to happen most often when repeating "edit code and play".

@Hiryuto Hiryuto added the Bug label Jul 15, 2023
@welcome
Copy link

welcome bot commented Jul 15, 2023

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@Hiryuto
Copy link
Author

Hiryuto commented Jul 15, 2023

When I play it, all the child elements of <div id="root" class="root-app"> disappear, so I assume they have turned white

@jht9629-nyu
Copy link

jht9629-nyu commented Jul 15, 2023

Get blank screen with script error in p5js editor v2.7.0
Sample sketch to repo the failure:
https://editor.p5js.org/jht9629-nyu/sketches/4DETmJP-l

function setup() {
  createCanvas(400, 400);
  foo() // error
}

function draw() {
  background(220);
}

@jht9629-nyu
Copy link

I see this in the console log.
Appears that Editor code is not able to deal with failure in this expression

        const errorObj = { stack: consoleEvent.data[0].toString() };

TypeError: Cannot read properties of undefined (reading 'toString')
at Editor.jsx:273:60
at Array.forEach ()
at o.value (Editor.jsx:269:34)
at ju (react-dom.production.min.js:251:463)
at t.unstable_runWithPriority (scheduler.production.min.js:18:437)
at Yi (react-dom.production.min.js:120:325)
at Bu (react-dom.production.min.js:244:437)
at Eu (react-dom.production.min.js:223:420)
at react-dom.production.min.js:121:115
at t.unstable_runWithPriority (scheduler.production.min.js:18:437)
vs @ react-dom.production.min.js:196
react

@matdas
Copy link

matdas commented Jul 15, 2023

Yeah, i am getting the same issue.

@0000marcosg
Copy link

Im getting the same error.
For me the issue appear when there is a error in the code. Instead of show the error in the console, the whole editor chrashes.

Tested in Chrome 114.0.5735.199 and Microsoft Edge 114.0.1823.82

@raclim
Copy link
Collaborator

raclim commented Jul 16, 2023

Thank you so much for reporting this, I'm really sorry that this issue happened due to an oversight in upgrading the console-feed package 😭 (further details about the issue and its fix in #2298)

I just deployed a new release which seems to resolve this issue for now, but please reopen this issue if it persists!

@raclim raclim closed this as completed Jul 16, 2023
@jht9629-nyu
Copy link

jht9629-nyu commented Jul 16, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants