Discuss Scratch

Hardmath123
Scratcher
1000+ posts

Project not loading.

My project http://scratch.mit.edu/projects/10007795/ doesn't seem to load, though its API does (http://scratch.mit.edu/internalapi/project/10007795/get/). I'm not sure why this is happening, and there's nothing tell-tale in the console. Help?

(This project has disappeared before, due to a string escaping but in the encode/decoder. Maybe that has come back from the dead.)

EDIT: Some hacking later, I found the issue: the backslash character (\) is not escaped properly when serializing to JSON.

Last edited by Hardmath123 (May 18, 2013 22:16:18)

Paddle2See
Scratch Team
1000+ posts

Project not loading.

Nice detective work! Where did you have a backslash character?

Scratch Team Member, kayak and pickleball enthusiast, cat caregiver.

This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.
(credit to Za-Chary)



;
Hardmath123
Scratcher
1000+ posts

Project not loading.

I was setting a variable to it or something—I actually was allowing string escaping in my parser within Scratch!
blob8108
Scratcher
1000+ posts

Project not loading.

Hardmath123 wrote:

Some hacking later, I found the issue: the backslash character (\) is not escaped properly when serializing to JSON.
Aha! My generator won't load it either

tosh · slowly becoming a grown-up adult and very confused about it
Hardmath123
Scratcher
1000+ posts

Project not loading.

Nice error message. Error: OK?
blob8108
Scratcher
1000+ posts

Project not loading.

Hardmath123 wrote:

Nice error message. Error: OK?
I blame jQuery.

tosh · slowly becoming a grown-up adult and very confused about it
Hardmath123
Scratcher
1000+ posts

Project not loading.

Yeah. Can you speak out against it on the sci collab thread? People (except me) listen to you.
johnm
Scratcher
100+ posts

Project not loading.

Great detective work! I found this broken project during alpha or early beta and immediately fixed the bug that caused it. (@blob8108 The problem did involve the JSON code passing JavaScript, although it wasn't specific to jquery. That code path that no longer exists.)

Fortunately, this problem was extremely rare. When I first found this problem I ran a scan of all projects that had been created up until that time and I believe this was the only project with this problem (there may have been one other).

I've manually repaired the project (http://scratch.mit.edu/projects/10007795/) so it now loads again.

Powered by DjangoBB