r122 game hangs on layout change

Bugs will be moved here once resolved.

Post » Wed Mar 20, 2013 5:21 am

First noticed this on PhoneGap, still happens in Chrome.

My game which was working perfectly before the upgrade to 122 now hangs whenever a change layout.

This is what I get from the chrome console:

Go to layout: Game preview_prelude.js:39
Change layout signalled to Game preview_prelude.js:39

it also crashes the browser tab, not the whole browser, but that tab become unresponsive.

Any ideas?
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Wed Mar 20, 2013 5:28 am

Apparently this happened only on one layout, deleted everything in it apart from a single button and it still happens, no error no nothing. Just hangs.
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Wed Mar 20, 2013 5:48 am

Ok so I was able to reproduce the bug.
https://dl.dropbox.com/u/1606950/scirra.capx

@Ashley please check this one out because it's amazing.

There are two layouts. If you click anywhere on them they change to one another. Now if you start with the one named "Credits" once clicked it switches to "Menu" like a charme. If you start from "menu" it hangs the tab (no error thrown).
Now here's comes the good part. I was able to pinpoint the cause of this: it's in the folder named "Arrays", if you delete the "Array_Menu_Items" array everything works as expected.

WHY?
Please someone give me an explanation.

Thanks

B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Wed Mar 20, 2013 7:26 am

Yep, I've tested your file on my side with Mozilla r15.0.1. Same issue + following two error pop-ups (either - or):

A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
Script: http://localhost:50000/layout.js:352


A script on this page may be busy...
Script: http://localhost:50000/common_prelude.js:638


I've tried to change the Touch event with normal Mouse on any click event - same error. Further tried to change to "System go to layout by name action" - same error.

And last, I've changed your Array to be Global (it was Local) - and voila, it works!! Maybe it is just a C2 logic issue, i.e. C2 is confused to make the Array not global, because you have more layouts, and which one should be the Array owner?! ... anyway, I'm also confused about the option Global regarding an Object?! If it is a visual object, it belongs automatically to a layout. If it is a Data & Storage object, and has to be layout specific, i.e. local/private, this has to be selected somehow.XManBG2013-03-20 07:39:29
B
11
S
3
G
3
Posts: 79
Reputation: 3,343

Post » Wed Mar 20, 2013 7:39 am

@XManBG Interesting. Thank you very much for your help.

It would still be nice to hear from @Ashley or at least that he checks this out because before 122 was working perfectly, this appeared after the update. More importantly any error is not supposed to make the page hang in that way without throwing any error at all especially because it's an "innocent" array.
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Wed Mar 20, 2013 3:49 pm

Oops - the engine gets stuck in an infinite loop, probably something I accidentally changed in r122. I've fixed it for the next build though.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests