Closed codeHusky closed 8 years ago
Related to https://github.com/Khan/live-editor/issues/521.
Partially #518 as well, but more specifically the message issue.
I think this is a duplicate of https://github.com/Khan/live-editor/issues/521, but since one has a nice screenshot I'll close the other as a duplicate of this.
I decided to (try and) spread some holiday cheer, by creating a really inaccurate "snow simulation" using the Khan Academy PJS environment (don't worry, I'm making one for terminal as well).
The idea, is that snow (ellipses) fall down the canvas, and then stop once it hits the ground (the bottom of the canvas, minus an offset).
Here's the program: https://www.khanacademy.org/computer-programming/simple-snow/6509434456637440
After the program runs for a little while, I get the error that @MikaalSky reported...:
I'm sure I could resolve this problem by removing the "snowflakes" after they hit the bottom of the screen, but where's the fun in that?
Merry Christmas,
Gigabyte Giant
The specific line of code that is at fault here is probably https://github.com/Khan/live-editor/blob/d75ef52dc624ac62e64a169437d8169962927786/js/output/pjs/pjs-output.js#L492
The callback assumes that the error will have an html property, but it actually has a infiniteLoopNodeType (or whatever it's called) property.
@Potato42 good detective work. Would you be able to put together a pull request with the correct property?
I've had bad luck in the past with the building process for live-editor PRs on windows. I might consider trying again, but if I understand the problem correctly, it's a really simple fix for someone who isn't on windows and is more competent at git and build tools than I am. Basically, just take the message from here, and use LoopProtector.nodeMessages[error.infiniteLoopNodeType]
for the type.
I'm going to take a look at this while I'm looking at another related thing; not sure if I will get a chance to fix it, but if not I'll unassign myself so others can.
I believe this was also fixed in d16b858 -- error-buddy now shows the location and a proper error message -- but I'm not entirely sure if I had a consistent repro of it in the first place. Please feel free to reopen or make a new issue if this isn't actually fixed for you, and thanks for all the reports!
Program In Question Basically, I ran against the wall a whole bunch and what I'm assuming is the loop protector fired. It leaves behind a really unhelpful error.