R86 script unresponsive with repeated keypress

Bugs will be moved here once resolved.

Post » Tue Apr 17, 2012 10:31 am

Hi All,

Testing on Win7 (64bit) with Firefox11 and IE9, I got the following when rapidly and repeatedly pressing the up arrow (IE just hangs, but Firefox gives the error message):

"Warning: Unresponsive Script

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/eveng.js:377"

Each error response gives a different line number.

The .capx is here:
http://dl.dropbox.com/u/47015043/code-platformer.capx

Not sure if my events are configured in a way that causes the error (I'm wondering if it's the OR block), but I figured I'd post it.

--Joejoeykid62012-04-17 11:18:59
B
12
S
5
G
5
Posts: 26
Reputation: 4,001

Post » Tue Apr 17, 2012 11:10 am

I've isolated the problem. Subtracting from the "PlayerFuel" variable (in Event 14) causes the hang. Not sure why, though. Maybe it's a race situation where it subtracts faster than it can update?joeykid62012-04-17 12:11:23
B
12
S
5
G
5
Posts: 26
Reputation: 4,001

Post » Tue Apr 17, 2012 12:54 pm

OK,

I figured out a structure which gives the desired behavior without the error.

Here are images of the error structure:


...and the no error structure:


Maybe it's possible to raise a warning flag in C2 for structures that appear valid but which create bad loops (which is I think what happened)? Although maybe I'm still just getting used to the ropes of C2.

--Joejoeykid62012-04-17 12:55:21
B
12
S
5
G
5
Posts: 26
Reputation: 4,001

Post » Tue Apr 17, 2012 3:36 pm

How do I reproduce the hang in the .capx? I tried moving about for a bit and it worked fine in my dev copy of r87 (out soon). Mind you, I've changed the way OR works in the next build, so it may be that it's already fixed. Please let me know if it still happens in r87 when it's out and I'll take another look.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Apr 18, 2012 1:18 pm

Appears to be fixed in r87. Thanks, Ashley!
B
12
S
5
G
5
Posts: 26
Reputation: 4,001


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests