Overlapping Containers - Graphic Bug?

Hey there,

I’ve got the following problem using containers:

There are two container (display.newContainer), both contain images and the image inside one of them exeeds its parents width and height (and is therefore cut of). The containers are placed in the same group (display.currentStage).

The problem is, if the upper container overlaps the hidden (masked) content of the bottom container, the overlaped content is revealed in the overlapping area. This only happens if there is content in the upper overlapping container (form, image, text or a group with one of these contents) and this content is rendered (isVisible = true and alpha > 0).

Is this a known issue, as I found nothing in the Docs, the Forum or the Web?

Would be nice to know why this is happening if there is a way to prevent it.

Best regards,

Torben

Can you put together a simple test case that demonstrates this?

Thanks

Rob

Hey Rob,

sure, here’s a short example.

Below you see how it looks in the simulator.

local container1 = display.newContainer(200, 200) container1.x, container1.y = 200, 200 local rect1 = display.newRect(0, 0, 400, 400) rect1:setFillColor(1, 0, 0) container1:insert(rect1) local container2 = display.newContainer(200, 200) container2.x, container2.y = 350, 350 local rect2 = display.newRect(0, 0, 100, 100) rect2.x, rect2.y = 50, 50 rect2:setFillColor(0, 0, 1) container2:insert(rect2)

Any ideas yet?

Hi @torbenratzlaff,

This sounds like a bug. Can you please file a bug report with your basic example code?

Thanks,

Brent

I’m seeing the same thing. When you file the bug report, please help our engineers by making sure the bug report is the minimal code (i.e. what you have above), a config.lua and build.settings file and any other assets needed. This needs to be put in to a .zip file.

Then use the Report a Bug link at the top of the page. When you fill out the form, it’s helpful to reference back to this thread. When you successfully submit the bug you will get an email with a CaseID # in the subject.

Please post that back here as a reference.

Thanks

Rob

Hey Brent,

thanks for your reply.

Filed the bug report (“Overlapping Containers - Masking Bug”)

CaseID: 45604

Unfortunetly I forgot to reference this post in the report :frowning:

Hope it will be fixed soon, so I can release my new library.

Best regards,

Torben

Thanks for your feedback. It appears you bumped in edge case of optimization under the hood of Corona. This should be fixed soon.

That’s great to hear :slight_smile:

I just couldn’t imagine, that nobody else encountered this problem before.

Thanks for the fast feedback.

Bug is fixed in 2016.2863. As severe as it seems, problem is really rare and would manifest itself only in simplest cases. It’s not like all containers had this issue. Only very specific, simple containers, rendered exactly one after another and having same objects inside.

Anyway. Thank you for your feedback, bug is fixed now.

Oh wow, that’s really specific O.o

Thansk alot for the quick fix! :slight_smile:

Seems like the bug fix led to another problem:

https://forums.coronalabs.com/topic/62608-display-group-insertion-issues-starting-with-build-2863/#entry324830

Looking into it. Thanks for reporting the issue.

This should be fixed in the next daily build! Thanks Vlad!

Thanks guys!

Can you put together a simple test case that demonstrates this?

Thanks

Rob

Hey Rob,

sure, here’s a short example.

Below you see how it looks in the simulator.

local container1 = display.newContainer(200, 200) container1.x, container1.y = 200, 200 local rect1 = display.newRect(0, 0, 400, 400) rect1:setFillColor(1, 0, 0) container1:insert(rect1) local container2 = display.newContainer(200, 200) container2.x, container2.y = 350, 350 local rect2 = display.newRect(0, 0, 100, 100) rect2.x, rect2.y = 50, 50 rect2:setFillColor(0, 0, 1) container2:insert(rect2)

Any ideas yet?

Hi @torbenratzlaff,

This sounds like a bug. Can you please file a bug report with your basic example code?

Thanks,

Brent

I’m seeing the same thing. When you file the bug report, please help our engineers by making sure the bug report is the minimal code (i.e. what you have above), a config.lua and build.settings file and any other assets needed. This needs to be put in to a .zip file.

Then use the Report a Bug link at the top of the page. When you fill out the form, it’s helpful to reference back to this thread. When you successfully submit the bug you will get an email with a CaseID # in the subject.

Please post that back here as a reference.

Thanks

Rob