Array in container bug!

Bugs will be moved here once resolved.

Post » Sun Apr 30, 2017 7:40 pm

Problem Description
Some weird bugs seem to crop up when an array is in a container!

Attach a Capx
https://1drv.ms/u/s!AhHSZHEulqh_ggjXgtvXjOTUxVzp

Description of Capx
array in a container, when object is created, it can't find the array or something.

Steps to Reproduce Bug
  • run and get error

Observed Result
error happens

Expected Result
no error

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

Operating System and Service Pack
vista

Construct 2 Version ID
244
B
47
S
22
G
65
Posts: 1,127
Reputation: 38,395

Post » Sun Apr 30, 2017 9:02 pm

Btw, I found this bug because I discovered that objects in the container weren't being picked when the array was picked. Or it wasn't picking the correct objects associated to the array..
So it seems like a pretty significant bug- was very frustrating trying to figure it out.
When I tried to modify the array when one of the container objects is created, it produced an error- so maybe that will help fix the issue.
It might only happen when it is dynamically created at runtime.. I don't think it happens when objects are setup in the layout. but I'm not sure.
B
47
S
22
G
65
Posts: 1,127
Reputation: 38,395

Post » Sun Apr 30, 2017 9:20 pm

Don't forget you have a container that exists at the start of layout.
That array is not implicitly picked by any condition, but neither are the ones just created.

No idea where that 4th array is coming from.
Image ImageImage
B
171
S
50
G
179
Posts: 8,382
Reputation: 113,458

Post » Sun Apr 30, 2017 9:46 pm

@newt , When an object that is part of a container is created in an event, all the other objects of that container get created as well. So you can immediately reference and work with the created objects. However, in this example it throws an error.

btw.. just noticed that if you restart it, sometimes there is 1, 2, 3, or 4 arrays..!?
B
47
S
22
G
65
Posts: 1,127
Reputation: 38,395

Post » Sun Apr 30, 2017 10:23 pm

Yes, like I said though it's not implicitly picked by the condition, the creation event is expected to pick just the new ones.
That may not be all that's happening.
Objects referenced in actions and that are not picked by conditions default to the first instance.
It's possible that the first instance is also being picked.
But that's probably just a byproduct of a bug with containers and arrays.

Note to Ashley.
It doesn't seem to affect dictionaries.
Image ImageImage
B
171
S
50
G
179
Posts: 8,382
Reputation: 113,458

Post » Fri Jun 23, 2017 4:53 pm

Thanks, interesting find. Should be fixed in the next build.
Scirra Founder
B
399
S
236
G
89
Posts: 24,529
Reputation: 195,390


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests