Freeze on Array loop Mathematical equation

Report Construct 2 bugs here.

Post » Sun Jul 30, 2017 5:04 pm

Problem Description
- Freezes the entire browser without error warning.
- Aparently caused for trying to do an ecuation in an array inside a loop (any kind of ecuation, example "Array.at(x,y)+1")

Attach a Capx
https://drive.google.com/file/d/0B7w6u3 ... sp=sharing
needed pluggin (error not affected by puggin): https://drive.google.com/open?id=0B7w6u ... EI0UEhNa2s

Description of Capx
It creates a noise array

Steps to Reproduce Bug
  • Run the CapX to see it freeze
  • Change action "Set Value getground to 1"
  • Run CapX to see it work
  • Change action back to "Set value getground to Array.At(getx,gety)+1"
  • Change the Array action to "Set Value at (0,0) to getground"
  • Run CapX to see it work

Observed Result
The CapX freezes if an ecuation uses the array value.

Expected Result
Resolve the math ecuation.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
Win 7 SP1 64bit

Construct 2 Version ID
Beta 245
B
19
S
3
Posts: 93
Reputation: 1,004

Post » Sun Jul 30, 2017 8:57 pm

If you intend to write more events to this (dont know if thats gonna be the case), that wait will bring you hopeless problems.

Besides that.

Use Browser plugin to log Sprite.UID&"/"&loop&"**"&Pico to the console in your last loop.
'loop' in there is a global variable you add 1 to in that last event.
Watch it run in Chrome's console.

At any iteration you (mostly) write a bigger number on a 'next' index in the array. It rarely resets.
So next iteration, when that next index is used, pico grows according, and keeps growing.

When the sprite 50 is picked, it allready does like 120.000 iterations. At that moment you write the same value on the same place in the array like 3000 times.

It is freezing because you created a near endless loop.
B
33
S
18
G
27
Posts: 2,441
Reputation: 20,346

Post » Tue Aug 01, 2017 3:14 am

Intresting, ill check the logic again, thanks
B
19
S
3
Posts: 93
Reputation: 1,004


Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests