Global layers: Objects go missing.

Bugs will be moved here once resolved.

Post » Tue Sep 23, 2014 2:13 pm

Problem Description
Setting layers to global in the startup layout causes all other objects on all other same-name layers to disappear (editor displays zero objects for the layer in question and runtime will complain about missing instances of objects being referenced). Trying to add new objects to a layout that had objects go missing threw the error message below. Seems to have been a one-off thing, I'm not getting the error message anymore, though layout objects are still missing. Setting the startup layout's layer back to non-global restores the objects in other layouts.

---------------------------
Construct 2 Check failure
---------------------------
Check failure! This is probably a bug:


Adding instance to layer with wrong layer owner

Condition: instance->GetLayer() == this
File: Projects\Layer.cpp
Line: 109
Function: void __cdecl Layer::AddInstance(class std::unique_ptr<class WorldInstance,struct std::default_delete<class WorldInstance> > &&,bool)
Build: release 181 (64-bit) checked
Component: Construct 2 IDE
(Last Win32 error: 0)

You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.
---------------------------
Abort Retry Ignore
---------------------------



Attach a Capx
https://dl.dropboxusercontent.com/u/705 ... rsBug.capx

Description of Capx
Simple capx with two layouts. Layout 1 has 3 layers and so does Layout 2. Layout 2 also have two objects, one on Layer 1 and one on Layer 2.

Steps to Reproduce Bug
    Set layer 1 or layer 2 on first layout to global. Watch layout 2 objects on same-name layer disappear.

Observed Result
Objects disappear/get disabled both in edit-time and in runtime.


Expected Result
That objects don't get disabled

Affected Browsers
  • Chrome: Don't know
  • FireFox: Don't know
  • Internet Explorer: Don't know
    Node-Webkit: Yes

Operating System and Service Pack
Windows 7 Service Pack <at least 1>

Construct 2 Version ID
r181
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Tue Sep 23, 2014 2:29 pm

Updated with capx link
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Tue Sep 23, 2014 2:33 pm

I just checked your link... your layers haven't been assigned global.
Check this capx. it works for me.
It will jump layout1 to layout2 to layout1 etc ever 3 seconds. I added global to both layouts.
layout1 - gui
layout2 gui2
globallayouttest.capx



Edit; this is such a cool feature - going to save countless hours - lol
You do not have the required permissions to view the files attached to this post.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Tue Sep 23, 2014 2:39 pm

Yeah, but what happens if you try to set one of the local layers to global on Layout 1 with my capx? Do you still see both objects on Layout 2?
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Tue Sep 23, 2014 2:50 pm

ErekT wrote:Yeah, but what happens if you try to set one of the local layers to global on Layout 1 with my capx? Do you still see both objects on Layout 2?


Performs as expected.
I changed layer2 to global and added a spritefont saying "I'm Global"
It performs as expected. Am I missing something?
GlobalLayersBug.capx


Edit; Your capx only have 1 sprite on layout two. Must I add the other?

okay added other sprite(blue) on and I see both.
added other spiret.capx
You do not have the required permissions to view the files attached to this post.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Tue Sep 23, 2014 2:56 pm

and now added 2nd sprite on startup
addedonstartup.capx

Works as expected.

Did you add the object - sprite to layout2? because you have to do that else you get error.
You do not have the required permissions to view the files attached to this post.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Tue Sep 23, 2014 3:01 pm

Edit; You online have 1 sprite on layout two. Must I add the other?


Nope. There are supposed to be two there, one greenish-blue and one purple. The green one is on Layer 1 and the purple on Layer 2.

If you start up the capx and go directly to the Layout 2 tab you should see em both. Then, if you set Layer 1 to global on Layout 1, the green one will vanish from Layout 2. At least that's what happens here.
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Tue Sep 23, 2014 7:37 pm

Okay downloaded your original. Don't know how my changed.
I went layout2, yes both sprites are there.
On layout1, I set layer1 to global and both sprites stayed. Nothing vanished.
Everything worked as expected. Interesting bug, Ashley hates these as they can't be reproduced. Maybe he gets same result as you and can trace it.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Tue Sep 23, 2014 10:47 pm

Ashley hates these as they can't be reproduced.

I bet! I would too.

I also get this when shutting down C2 right after following the steps in my previous post:

---------------------------
Construct 2 Check failure
---------------------------
Check failure! This is probably a bug:

Object texture leak: a texture is still loaded when cleaning up an ObjectTexture, check all textures released properly

Condition: gl_instances.empty()
File: Projects\ObjectTexture.cpp
Line: 33
Function: __cdecl ObjectTexture::~ObjectTexture(void)
Build: release 181 (64-bit) checked
Component: Construct 2 IDE
(Last Win32 error: 0)

You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.
---------------------------
Abort Retry Ignore
---------------------------
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Thu Sep 25, 2014 4:14 pm

It's by design that if you set a layer to global, it overrides the objects on all the other layers with its own content. However due to the architecture of the editor the overridden layers can't be displayed on the other layouts, so their content will seem to disappear. This is still by design at the moment.

I can reproduce editor issues if you try to modify a globally overridden layer - the editor will prevent that and tell you to modify the original global layer instead. I can reproduce some cases there and I'll try to fix all cases of that for the next beta. However the OP alludes to a runtime error but does not specify how that occurs. Can you describe some more about that? Can you still get it to happen even if you pretend the editor doesn't allow you to modify a layer which has been overridden?
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,600

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests