Wick editor just crashed

and i last saved 10 mins ago rip :(
oh good the autosave saved what happened before the crash, now it’s very easy to reproduce

i was trying to make some flash animation thing play when a certain event happens. then it froze. then it crashed.

here is the project: pong8-12-2020_10-04-49PM.wick (4.4 KB)
it crashes everytime the ball touches the right side, then you pause the game.

here is the error i got in the console:
TypeError: window._scriptOnErrorCallback is not a function
at Wick.Project.stop (wickengine.js:50723)
at t.e.componentDidUpdate (Editor.jsx:243)
at za (react-dom.production.min.js:4980)
at Ua (react-dom.production.min.js:5123)
at react-dom.production.min.js:5975
at Object.t.unstable_runWithPriority (scheduler.production.min.js:274)
at Ds (react-dom.production.min.js:5974)
at Fs (react-dom.production.min.js:5958)
at Os (react-dom.production.min.js:5925)
at js (react-dom.production.min.js:6020)
fa @ react-dom.production.min.js:4408
Editor.jsx:109 Uncaught TypeError: window._scriptOnErrorCallback is not a function

1 Like

Same experience with the editor… every day… literally, my workflow, unfortunately is like doing a change then save… doing another change, then save… over and over… I could have in my download folder 50 different save per night. Regardless, sometimes I loss 5 minutes of work or so… sometimes the autosave saves me, but most of the time I lose my work. It is very inestable in that regards, specially when you deal with code that dynamically clone objects… BUT, since this is a free tool, it is more what I’m gaining than what I’m loosing.

Great Pong game, I loved it… In one instance, the ball went through the middle of the paddle. You should use object.hitTest(otherObject), in case that you arre not using that… it is very useful and precise.

I found what’s making the project crash, go to the ball update script, line 42. If u delete that line, the project works all right, so replacing it would be smart.

    player2_scoreAnim.playAnim();

Wow, one line crashes a whole project like this…

Other than that, ur game looks amazing : )

I’m gonna look into this crash. Looks like something is being called out of order… Sorry about that!

1 Like

Wow, this is a really sneaky, subtle bug. I’ve added in a safeguard for now that will be up on 1.18 by the end of the day.


Here’s a detailed explanation for anyone curious.

The problem was that when you stop the project, for some reason your update script ran after the project was stopped. (This is a nasty bug, that’s gonna need some deeper digging.)

then…

Wick tried to call your function this.rectHit(), but since the project was stopped, the function no longer existed so it caused an error.

then…

Wick attempted to throw an error, telling you “hey , this.rectHit doesn’t exist”.

but…

By the time this error was called, the code that alerts you to errors had also been deleted because we stopped the project.

which…

Caused the error function to be called when it didn’t exist, crashing the page.

bleh.

I’m going to add a few issues and we’ll hopefully be able to fix this bug properly in 1.19, but a hotfix will be out today for 1.18 (on test.wickeditor.com) that will make this specific bug not occur anymore.

Sorry again for the problems!

2 Likes

i used that but there was a glitch that happened and making my own rectangle hit function seemed to have fixed it. probably because hitTest also checks pixels

oh i figured out why my code caused this in the first place. you can only access sibling clips with a variable. player2_scoreAnim was a child of a sibling clip (for the ball clip), so when I tried to access that with a variable name, it returned null.

is there a way to access the children of a certain clip?