-
Notifications
You must be signed in to change notification settings - Fork 80
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
Google Chrome ran out of memory #5
Comments
Does this happen every time? It shouldn't be a memory problem, since the stream arrays are only created once -- then simply moved back to top (so requiring no new memory). If you can, check for any funny business in the console while you're running it in the Chrome Browser (Control + Shift + J , I think, is the short-cut way to bring up the console). Good luck! |
I've always run any p5 sketch with the console open, just to make my life easier. To answer to your question, it seems to be reproduceable ~70% of the time, but the time varies. The first time it took like 10 minutes, I just left it running in the background, then when I got home I ran it for another 9 times, with nothing more opened than brackets and that was pretty much it. 8GB of RAM so that's not an issue either, console didn't seem to show me any funny business. I haven't modified the code too much either. Added some vars for a random coloured background every frame and did the same for the fonts. It's really dangerous for people with epilepsy and really trippy if you look at it for more than 10 seconds. I'll add my modifications here :
This is for the BG(Obvisously);
This is for every letter. |
Thanks for the details. Hmmmmmm....all looks fine. Nice code. It would be really nice to track down the memory leak! (I've not tried running my own version of the sketch for as long as 10mins -- I'll try it myself in Chrome, and see if it happens too. Do you have a link to the whole of your code? (Or you could Gist it to me?) -- no probs if not! |
https://gist.github.com/justfun23/a8f3982cd53d08b777ea7521ebab51c9 There you go, as I've previously said, nothing much changed so yeah ^_^. |
Thanks :) (You weren't lying about the epilepsy thing!) Added a semi-colon to line 13. Does that fix issue? Can't see anything else at all. Only possibly line 41, changing second parameter of random to 95 instead of 96 (referring to number of katakana) to play it safe? https://gist.github.com/RedHenDev/a70899acccc9ba91b538d76655bf291d |
This is super interesting. It's not immediately clear to me what's causing this issue, but I just wanted to chime in and say you guys are amazing for digging so deeply into this! I'll see if I have some time in the coming weeks to try to investigate a bit on my end too. |
So I was showing p5.js to one of my teachers and I wrote your code with some slight variations in speed, opacity and some colors and what happened is that Google Chrome showed me this :
I am not that proficient to figure out why does that happen but from what I know, it seems to me that the items in the array don't get dropped every time they finish looping, rather are just being stored until it runs out of memory.
If in any way my assumption is wrong please do correct me and explain why this occurs and what are some possible solutions for this. Thanks !
The text was updated successfully, but these errors were encountered: