Bug with Scrollview, images with mask, and Samsung Galaxy S3

9 replies [Last post]
Stephen Lewis
User offline. Last seen 1 year 27 weeks ago. Offline
Joined: 24 Sep 2010

I am trying to import images into a scrollview and am having a problem on a specific device: a popular, recent phone, the Samsung Galaxy S3 (Android v 4.1.1).

What I am trying to do is insert an image into a scrollview where BOTH the image and the scrollview each have their own mask. The scrollview needs a mask since I need the scrollable area to be smaller than the screen, and the image needs a mask in order to apply rounded edges. This works fine on every other device I've tested on, including iOS devices, Kindle Fire, FIre HD, Nook Color, Nook HD, devices with older versions of Android, and the Corona simulator.

But on the Samsung S3 the image is rendered invisible. The image responds to touch events so I know for a fact the image exists as a display object inside the scrollview object. It's simply not visible. If I turn off masks on the image they become visible. If I render the masked image external to the scrollview they become visible. So it has something to do with a masked image being rendered inside a masked scrollview.

I'm using the current daily build 1035, but I've noticed this problem for at least the past 2-3 weeks so it doesn't appear to have anything to do with the new Widget 2.0.

Anyone have any insight as to how I can get this to work on the Galaxy S3, or why it doesn't work on this device when it works fine on older, less capable devices?

Replies

Stephen Lewis
User offline. Last seen 1 year 27 weeks ago. Offline
Joined: 24 Sep 2010

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

Danny
User offline. Last seen 1 year 5 weeks ago. Offline
Staff
Joined: 17 Aug 2011

@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

Stephen Lewis
User offline. Last seen 1 year 27 weeks ago. Offline
Joined: 24 Sep 2010

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

Danny
User offline. Last seen 1 year 5 weeks ago. Offline
Staff
Joined: 17 Aug 2011

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?

Stephen Lewis
User offline. Last seen 1 year 27 weeks ago. Offline
Joined: 24 Sep 2010

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

Danny
User offline. Last seen 1 year 5 weeks ago. Offline
Staff
Joined: 17 Aug 2011

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.

Stephen Lewis
User offline. Last seen 1 year 27 weeks ago. Offline
Joined: 24 Sep 2010

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

Danny
User offline. Last seen 1 year 5 weeks ago. Offline
Staff
Joined: 17 Aug 2011

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.

Stephen Lewis
User offline. Last seen 1 year 27 weeks ago. Offline
Joined: 24 Sep 2010

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

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.