-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Negative y-values cause crash #7535
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you! |
Hi @1v4r0 ! I tried this out here: https://editor.p5js.org/ksen0/sketches/4B3ot2kbJ and I didn't get an error on Could you share a code snippet/sketch and the error you get, please? |
I get the same error on your program as in mine https://editor.p5js.org/1v4r0/sketches/Civ7h1KSi which is: TypeError: Cannot read properties of undefined (reading 'length') 🌸 p5.js says:
|
Hi @1v4r0 ! I am not facing any error in https://editor.p5js.org/1v4r0/sketches/Civ7h1KSi (you shared). everything is working well on my side |
Weird, I just tested it on chrome, and it's working. I guess it's some weird browser based error. |
I get no error in https://editor.p5js.org/1v4r0/sketches/Civ7h1KSi whether I'm logged in or not in both Chrome and Firefox. macOS Big Sur, 11.7.10 |
I made a short video showing the error. I start with a logged out version of p5, where I test the line and it works. I log in and the exact same code breaks. |
Yup. That sure is crashy. |
This happens when you have table text accessible outputs turned on in the editor: I'm going to close this in favour of #7259 which also tracks this issue. If anyone is interested in implementing the suggested fix in there, feel free to leave a comment on that issue! |
Most appropriate sub-area of p5.js?
p5.js version
1.11.1
Web browser and version
Version 1.74.48 Chromium: 132.0.6834.83 (Official Build) (64-bit)
Operating system
Pop-OS(Ubuntu) 22.04
Steps to reproduce this
Just do a
"line(-1, -1, 401, -1)"
in draw somewhere. Apparently it can't handle purely negative y-values, which is something that often happens in code, where you "clip the edges" before "deletion". The weird thing is that negative x-values seem to be fine, not sure why y-values have this weird bug.
This is extremely annoying and I've gotten this bug numerous times, e.g. when doing translations in a coordinate system grid, where one of the grid-lines pops out of frame before being "undrawn". It is also surprisingly annoying to fix, which I've probably used hours on at this point.
EDIT: The bug only seems to show up when logged in.
The text was updated successfully, but these errors were encountered: