Open codeHusky opened 9 years ago
...doesn't affect Chrome (or any browser, for that matter), on my machine. Perhaps you need to turn the generation levels(?) down a bit so your machine can run the program in Chrome?
I don't think this is related to a live-editor bug, but that's just me.
The link killed my machine Chrome. I'm running Chrome 44 on Mac OS X 10.9.5. I tried it on an older version of live editor using http://khan.github.io/live-editor/demos/simple/ and it worked fine. I still need to try it in Chrome in a more recent version of the live-editor on its own to rule out any bad interaction that might be occurring when live-editor is embedded on khanacademy.org.
@MikaalSky @Gigabyte-Giant what OS and version of Chrome were you using?
OS: Mac OS X 10.10.3 Chrome Version 37.0.2062.122
That's interesting that it killed Chrome for you as well @kevinb7 when visiting the link, but worked fine in the demo.
The demo was updated in December so it's not update with what's on khanacademy.org.
...I realize that @kevinb7. I'm quite interested to find out why it works on my machine, and not either one of you guys' machines.
Windows 8.1, Version 43.0.2357.81 m
Sounds like it has to do with the version of chrome. Me and Kevin are on version 40+, and Gigabyte is on 30.
I tested the program using the most recent version of live-editor as well as the version that's published to khanacademy.org and they both work when running in the browser in isolation. From this it appears there's something happening when it's embedded in the site that Chrome does not like.
Do you have crash reporting enabled in Chrome? If you have that, then you can file a bug in the chromium issue tracker and they'll check out the trace. I've seen a few bugs only happen when the editor is embedded. Sometimes they end up being our fault, sometimes it's Chromes.
I'll try to get an actually crash. Usually it just freeze the tab. One time I got it to freeze Chrome, and I had to restart it. Is there anyway to get reports out of frozen tabs?
The tab freezing is a big sign that either your machine, or Chrome can't handle the program. Perhaps try setting the "fastGraphics" variable to true? (If it freezes to fast for you to do that you're probably out of luck)
No no no, its related to get(). It never happened before but for some reason after some of the latest commits the live-editor has been acting up.
I created another program with just the texture generation at the start and it works fine so I don't think get
is the issue. https://www.khanacademy.org/computer-programming/more-noise/5887732934115328
@JavascriptFTW It's definitely Chrome. The program runs fine in Firefox on the same machine. I get 60fps too so it's definitely not struggling to run it.
Well, it might have something to do with rendering the get() calls.
What do you mean by rendering the get() calls
? There's only one call to get()
in the entire program.
The program saves a bunch of get() calls to an array, then a certain object selects one, and draws it on-top of the shapes to give texture.
https://www.khanacademy.org/computer-programming/minecraft-ke-more-noise/5971033575129088 It's related to the for loop containing the code that generates the noise. (It's at the top of the program) The for loop contains rect() calls, random(), fill(), get() and pushing to an array.