Bug: Nested Masks Cause Masked Images To Be Invisible On Galaxy S3

Hey Stephen.

Question for you. My gut feeling is that this isn’t a bug with scrollViews but more of a masking bug.

If you take the scrollView out of the equation and just whip up a sample that does the same masking, does the issue also occur? [import]uid: 84637 topic_id: 36305 reply_id: 144323[/import]

Danny,

If I don’t insert the masked image in the masked scrollview, then the image shows up. If I don’t use a mask on the scrollview but still insert the masked image in the scrollview then the image shows up. To me it does appear to be related specifically to the use of a scrollview with a mask and an image with a mask. And, to reiterate, I’m only seeing the problem on the one specific device, the S3.

I tried to find a Corona sample app that uses a scrollview with a mask to see if I could duplicate the issue, but I couldn’t find one. Do you know if there is?

Thanks for taking a look.

-Stephen [import]uid: 9422 topic_id: 36305 reply_id: 144326[/import]

Hey Stephen.

I think you missed my point.

I believe this could be just a masking issue on the galaxy s3. So my idea was that you would make up a basic sample that masked an image and then masked an image contained inside of that and see if it shows up. Without using a scrollView at all.

There have been similar issues on android devices in the past with nested masks ( ie a masked image inside another masked image ).

That will help us find out where the issue lies, either with scrollViews or the more likely issue of masks. [import]uid: 84637 topic_id: 36305 reply_id: 144327[/import]

Hi Danny,

Right, I didn’t understand how to test nesting masks without using a scrollview, but I think I got it now.

I took the existing Corona sample “Flashlight” and modified it a little so there are display groups and an extra image with its own mask applied. Sure enough, it works fine in simulator and on an old Android tablet I have running Android 2.3.4, but on the S3 the extra masked image is invisible. So, indeed, the scrollview isn’t the problem, it’s nested masks.

I will file a bug for this and include the modified flashlight project. But I’m wondering (and worrying) if this is something that can’t be fixed on the Corona side and is some kind of hardware limitation of the S3? It seems weird that such a high end device would have a hardware limitation not present on much older hardware.

EDIT: I filed bug Case 21180 [import]uid: 9422 topic_id: 36305 reply_id: 144355[/import]

Hey Stephen, thanks for doing that. Now we know where the problem lies at least.

I doubt it’s a masking limit as I said earlier, this is probably just a bug. [import]uid: 84637 topic_id: 36305 reply_id: 144398[/import]

I have another bug that causes a crash on the same device, galaxy s3. If I try to import an image from the Gallery, and the image is from the cloud, (such as picasa or facebook), my app crashes and a Runtime Error crash window appears: ?:0: attempt to index upvalue ‘?’ (a nil value)

I can open images from the same cloud folders fine on a Kindle Fire HD (Android 4.0), so, again, it seems like there’s something specific to the S3 that isn’t being handled by Corona.

I tried using the Corona sample app ‘PhotoPicker’ to open images from the same cloud folders. The app doesn’t crash, but it silently fails and doesn’t open those pictures.

Coronalabs, have you tested PhotoPicker with cloud based images on an S3? You include the S3 skin in the simulator so I think you agree it is a popular phone and version of Android that Corona should aim to fully support.

EDIT: I submitted a bug for this: Case 21159

-Stephen [import]uid: 9422 topic_id: 36305 reply_id: 144303[/import]

@Stephen.

Android devices have a nested masking limit. Your only masking 2 levels deep though right?
I will see if anyone has any info on the masking limit on a galaxy s3 [import]uid: 84637 topic_id: 36305 reply_id: 144318[/import]

Hi Danny,

Yes, I only use two masks, one for the scrollview and one for the image itself. But there are image groups involved and I’m using Storyboard so maybe that’s related. From the bottom up here are the layers:

Storyboard scene group
>Scrollview (with mask)
>>Photos Image Group
>>>An individual photo (with mask)

As I mentioned, this works fine for me on older, lesser versions of Android and crappy devices like the Nook Color. And it works fine on a Kindle Fire HD I tested on which is using Amazon’s version of Android 4.0. So I doubt it is a hardware limitation of the S3 which is the most modern device I have access to.

-Stephen [import]uid: 9422 topic_id: 36305 reply_id: 144322[/import]

Hey Stephen.

Question for you. My gut feeling is that this isn’t a bug with scrollViews but more of a masking bug.

If you take the scrollView out of the equation and just whip up a sample that does the same masking, does the issue also occur? [import]uid: 84637 topic_id: 36305 reply_id: 144323[/import]

Danny,

If I don’t insert the masked image in the masked scrollview, then the image shows up. If I don’t use a mask on the scrollview but still insert the masked image in the scrollview then the image shows up. To me it does appear to be related specifically to the use of a scrollview with a mask and an image with a mask. And, to reiterate, I’m only seeing the problem on the one specific device, the S3.

I tried to find a Corona sample app that uses a scrollview with a mask to see if I could duplicate the issue, but I couldn’t find one. Do you know if there is?

Thanks for taking a look.

-Stephen [import]uid: 9422 topic_id: 36305 reply_id: 144326[/import]

Hey Stephen.

I think you missed my point.

I believe this could be just a masking issue on the galaxy s3. So my idea was that you would make up a basic sample that masked an image and then masked an image contained inside of that and see if it shows up. Without using a scrollView at all.

There have been similar issues on android devices in the past with nested masks ( ie a masked image inside another masked image ).

That will help us find out where the issue lies, either with scrollViews or the more likely issue of masks. [import]uid: 84637 topic_id: 36305 reply_id: 144327[/import]

Hi Danny,

Right, I didn’t understand how to test nesting masks without using a scrollview, but I think I got it now.

I took the existing Corona sample “Flashlight” and modified it a little so there are display groups and an extra image with its own mask applied. Sure enough, it works fine in simulator and on an old Android tablet I have running Android 2.3.4, but on the S3 the extra masked image is invisible. So, indeed, the scrollview isn’t the problem, it’s nested masks.

I will file a bug for this and include the modified flashlight project. But I’m wondering (and worrying) if this is something that can’t be fixed on the Corona side and is some kind of hardware limitation of the S3? It seems weird that such a high end device would have a hardware limitation not present on much older hardware.

EDIT: I filed bug Case 21180 [import]uid: 9422 topic_id: 36305 reply_id: 144355[/import]

Hey Stephen, thanks for doing that. Now we know where the problem lies at least.

I doubt it’s a masking limit as I said earlier, this is probably just a bug. [import]uid: 84637 topic_id: 36305 reply_id: 144398[/import]

Hi Danny,

Any news or progress on the nested masks issue? I’ve tested using build 1049 and still have the problem of invisible images on the Galaxy S3. I’ve got my app shipped on Nook, Kindle Fire, and iOS, but this bug is holding me up from shipping on generic Android (Google Play and non Kindle Amazon stores). It’s part of a major feature for my app and I haven’t found a workaround that doesn’t use nested masks.

-Stephen [import]uid: 9422 topic_id: 36305 reply_id: 145737[/import]

Waaaah. No love for me. 

 

And I can’t seem to find a working link to the public bug tracker to see if bug 21180 is in the pipe.   Did the link get lost in the new forum re-shuffle?

Hello Stephen,

 

Regarding selecting remote photos from Google+, Picasa, DropBox, etc… we’ve added support for this as of daily build #1041.

 

Regarding the masking issue, there is currently no one available to look into this issue yet.  Would you mind doing a quick test  for us first?  It’ll help shorten the time for us to address this issue.

Does this nested masking issue happen with the last release build #971?

http://developer.coronalabs.com/downloads/corona-sdk

 

This is to help us identify if this issue was caused by a code change on our end or if this is a device specific issue that has always existed.  I suspect it is an OpenGL driver bug specific to the SIII which we would have to work-around.

Hi Joshua,

 

I just tested my revised sample Flashlight project using build #971 on my S3 and the nested, masked object still renders invisibly.  So the bug is still present on the older build.  I guess that means it’s an OpenGL driver bug on the SIII.  Should also I assume that bug is also present on the S2, the new S4, and other late model Samsung Android phones?  

 

Thanks for taking a look at this.

 

-Stephen

Stephen,

 

I tested the sample project that you gave us with your bug report.  Unfortunately, I was not able to reproduce this issue on our Samsung Galaxy SIII.  In fact, it worked on the following devices:

  • Samsung Galaxy SIII

  • Samsung Galaxy Nexus

  • 1st generation Droid

 

That said, I was able to reproduce this issue on the following device:

  • HTC Evo 4G

 

I’ve confirmed that this issue happen on the HTC device with Corona build #971 (the last release) and build #1055.

 

Unfortunately, we don’t know what the root cause is yet.  It is most likely an OpenGL driver bug that we have to work-around, like I mentioned up above.  Those are some of the hardest to track down.  The last OpenGL driver bug we worked-around took us about 6 months of off-and-on work to isolate.  So, unfortunately, it’s impossible for us to give you a time estimate.  The best we can do is for you and I to keep testing this on multiple devices and Android versions to isolate what exactly causes this issue.

 

What I find curious is why this issue happens to your SIII device and not ours.

Is your SIII device rooted?

Can you also tell me what Android OS version it is running please?

Ok, great to know you at least can reproduce the issue.  Troubling that you can’t reproduce it on the same device I can, though.   Other than version of  Android what other factors could possibly explain that?

 

FYI, My S3 is not rooted, and it is running Android v. 4.1.2.  Is your S3 running a different version?  Other info. for my S3:  Hardware v. L710.14, Model SPH_L710, Kernel v. 3.0.31-944783.

 

Understood re: the difficulty of tracking these types of bugs down.  Sounds like a nightmare.  I wish I could help!

 

-Stephen

My Galaxy SIII is different than yours…

Model: GT-I9300

Android OS Version: 4.1.2

Kernel Version: 3.0.31-789635

 

Yeah, something I’ve noticed about the SII and SIII devices is that there are a lot of different models/variations of them.  It seems like SII  and SIII is more of a brand.

 

We’ll figure something out.  I’ll contact you about this later this week.