On destroyed and layout change

Bugs will be moved here once resolved.

Post » Sat Nov 09, 2013 7:23 am

Link to .capx file (required!):
https://dl.dropboxusercontent.com/u/5426011/bug/bug_creation_from_destructor.capx

Steps to reproduce:
1. Add a sprite and add an "on destroyed" event.
2. In that event have another object get created.
3. Then make an event to change or restart the layout.

Observed result:
When the layout changes the object created in the "on destroyed" event still exists.

Expected result:
I would expect no objects to survive a layout change unless they were global.

Browsers affected:
Chrome: untested
Firefox: yes
Internet Explorer: untested

Operating system & service pack: Vista sp2

Construct 2 version: 149
    
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Sat Nov 09, 2013 9:31 am

I glazed over the observed result. This is an issue with Construct 2. PixelStroke2013-11-09 09:34:21
B
7
Posts: 2
Reputation: 481

Post » Sat Nov 09, 2013 5:19 pm

I forgot to search for existing bugs and was informed about this existing one:
http://www.scirra.com/forum/r116-changing-layout-and-on-destroyed_topic62431_post383279.html
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Mon Nov 11, 2013 7:42 pm

I think given my comment from the linked bug report, this should not be fixed otherwise we will create another infinite-loop bug. Based on that, closing as won't fix.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Mon Nov 11, 2013 9:32 pm

Cool deal, I should have searched before posting. I may end up using this eventually anyway. It's an interesting way to make an object on the next layout without making the object global.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Tue Nov 12, 2013 10:17 am

I would perhaps avoid relying on this kind of behavior - it's a sort of edge case thing that might change in future.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest