/n in a string in an array leads to JS assertions

Bugs will be moved here once resolved.

Post » Thu Oct 20, 2011 4:19 pm

C2 r63; Windows XP SP3; FireFox 7.0.1; ATI Radeon HD 4870
Dual-core E5200 @ 2.5 GhZ; 3,5 Go RAM

I launched a preview of my current project.
During the time firefox was launching (it takes a few second before appearing if it wasn't running at first) I clicked the save icon in the top bar of C2.
C2 simply exited without any messages, and when firefox finally started, it got stuck on a blank tab with the preview url in it.

I reopened C2, my changes had not been saved.
I processed to reput the events and new images I previously added, saving regulary (still with the save icon).
Then comes the time for a preview.

I go back to my menu layout, to launch the game from the start, and firefox raises a json assertion :/
Assertion failure: No project JSON model available

Stack trace:
assert2((void 0),"No project JSON model available")@http://localhost:50000/preview_prelude.js:12
()@http://localhost:50000/preview.js:107
([object HTMLCanvasElement])@http://localhost:50000/preview.js:90
("c2canvas")@http://localhost:50000/preview.js:10
((function (a, b) {return new e.fn.init(a, b, h);}))@http://localhost:50000/preview.html:98
([object HTMLDocument],[object Array])@http://localhost:50000/jquery-1.6.3.min.js:2
()@http://localhost:50000/jquery-1.6.3.min.js:2
([object Event])@http://localhost:50000/jquery-1.6.3.min.js:2

Exiting C2 and launching it changed nothing. :(
Now I have two bugging projects.
The one I was working one at first, and saved during the launching of FF.
And the project I saved after having redone the events.

Both display the same assertions on preview.

I'll try and mess in the project file to see if I can recuperate the project, and figure where it can mess.
That's my entry for the C2 comp.
I have previous backups, so I can still redo what I've done. But honestly it bugs me ^^

After further investigation, it appears it was one of my strings in LanguageSheet that caused the problem. (arrLang.at(4,1))
I wrote my "dialogues" in the notepad first, and did copy/paste it into C2.
In the notepad I had a /n ("chariot return" ?) between "S. Pace - Que se passe-t-il ? Pourquoi suis-je dans ma tenue ?" and "O sont les autres ?". It got copied in C2 and caused a mess.
I just suppressed it afterwards, and the assertion disappeared.
Hope the rest of the project will be ok.

As I want to keep this project secret a bit longer, I'll PM ashley only with the project for double check.
^^

As for the saving bug at first, I then have no clue about that. Maybe a combination of bad timing saving project/loading preview.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Thu Oct 20, 2011 5:16 pm

Thanks for the report. If you paste in a carriage-return line-feed line break (\r\n, presumably how notepad does its line breaks) then C2 turns the line-feed in to a \n in the javascript source, but left the carriage-return character which made the browser reject the javascript. Should be fixed in next build.

Not sure what to do about the crash on save - can you reproduce it at all?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,620


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests