build640-821:image,sprite,mask and text displayed as color box on some android phones (gpu:Adreno200 Adreno205)

My app runing very well on iphone? ipod touch, but when installed on android, some of the image will not show, and display as a white box. some time The text also will display as a color box(the same color as the text color) or be scaled and distorted.

Some of the mask can not work. The mask place shows a white backgound, and outside the masked place the content can not hide.

I’ve tested on sony Ericsson x10 and HTC G7/G11 and got the same problem.

Dose it means the app need higher capability of GPU?
[import]uid: 82934 topic_id: 26437 reply_id: 326437[/import]

That is a sign that your graphic (or text which is converted to a graphic for opengl purposes) has exceeded the maximum texture size for that device. While most iOS devices support a 2048x2048 texture size, not all Android devices do. Some are limited to 1024x1024. It’s pretty easy to get text to go past 1024px.

So check your image sizes. [import]uid: 19626 topic_id: 26437 reply_id: 107276[/import]

Thanks.

I’ve checked all the image size and the device’s maxTextureSize.

system.getInfo(“maxTextureSize”) function returns 4096 and the biggest image in my app is 2000*1200, and the others are no more than 1200, most of them are small size.
I just wondering if there are too many display objects or groups in the screen, will the device can not redraw all the things? [import]uid: 82934 topic_id: 26437 reply_id: 107599[/import]

Where are you viewing the max texture size? In the corona simulator? Or are you looking at a console log from the device that’s having the problem?

Each device/OS combination may be different. [import]uid: 19626 topic_id: 26437 reply_id: 107601[/import]

I build a small app that only one line code:

display.newText(system.getInfo( “maxTextureSize” ), 100,100,native.systemFont, 20)
And install on the android device.

Three of the tested android device shows 4096.

And the biggest image i mentioned before which is 2000*1200 size display good.
[import]uid: 82934 topic_id: 26437 reply_id: 107606[/import]

I got some information about adreno 205 drivers.
Is it has something to do with that?
[import]uid: 82934 topic_id: 26437 reply_id: 107833[/import]

Henry,

We’ve recently discovered an OpenGL bug that is common on HTC devices (and possibly other devices) that will cause the issue that you are describing. We’ve found a work-around for this OpenGL bug, and this fix will be made available in daily build #822. I recommend that you try out this build and see if it resolves this issue. [import]uid: 32256 topic_id: 26437 reply_id: 120375[/import]

Henry,

We’ve recently discovered an OpenGL bug that is common on HTC devices (and possibly other devices) that will cause the issue that you are describing. We’ve found a work-around for this OpenGL bug, and this fix will be made available in daily build #822. I recommend that you try out this build and see if it resolves this issue. [import]uid: 32256 topic_id: 26437 reply_id: 120375[/import]

Sorry for bringing back an old thread…

I’ve had exactly this issue reported to me just yesterday by Amazon - one of my image textures displays as a white box.  I’ve never been able to repro it myself, but they saw it using an HTC Droid incredible - which I don’t have available for testing.

My current build was made using the most recent public release - does this mean that the OpenGL bug hasn’t been squashed?  Or was the fix never rolled into the public build?  Could you give any more details about the bug you identified, so that I could repro it, or try a different sort of workaround?

Hi @Sunstone Games,

What size is the image file (texture) that’s turning into a white square? As reported in the other posts in this thread, this usually happens when you exceed the device’s max texture size (but since you don’t have the HTC Droid Incredible for testing, it may be difficult to search for and determine the max texture size on that device).

Brent

It’s a 256x256 sprite.  I use it all over the place - there is just one level where this seems to happen.

The difference on this level is that the sprite is being displayed slightly larger than it is elsewhere… though still smaller than the original 256x256 size.  My game uses a variable-size grid, and these sprites scale to fill each grid square.  The problem level has the smallest grid size in the game - 3x3 - so the sprites are drawn larger there than anywhere else in the level.

Is there some memory-allocation-check I can use to verify that this issue is related to texture size?

Hi @Sunstone Games,

You can use the following code to check for actual texture memory consumed. It helps to run this on a repeating timer of 1 second or so, and monitor how it changes when you add or remove display objects from the stage.

[lua]

local function memCheck()

    collectgarbage(“collect”)

    local memUsage_str = string.format( “MEMORY = %.3f KB”, collectgarbage( “count” ) )

    print( memUsage_str, "TEXTURE = "…(system.getInfo(“textureMemoryUsed”)/1048576) )

end

timer.performWithDelay( 1000, memCheck, 0 )

[/lua]

That being said, a valid 256x256 texture should not be causing any memory issues. There might be some issue with the file itself. You should check through the list of “requirements” for images here:

http://docs.coronalabs.com/api/library/display/newImage.html

Brent

Sorry for bringing back an old thread…

I’ve had exactly this issue reported to me just yesterday by Amazon - one of my image textures displays as a white box.  I’ve never been able to repro it myself, but they saw it using an HTC Droid incredible - which I don’t have available for testing.

My current build was made using the most recent public release - does this mean that the OpenGL bug hasn’t been squashed?  Or was the fix never rolled into the public build?  Could you give any more details about the bug you identified, so that I could repro it, or try a different sort of workaround?

Hi @Sunstone Games,

What size is the image file (texture) that’s turning into a white square? As reported in the other posts in this thread, this usually happens when you exceed the device’s max texture size (but since you don’t have the HTC Droid Incredible for testing, it may be difficult to search for and determine the max texture size on that device).

Brent

It’s a 256x256 sprite.  I use it all over the place - there is just one level where this seems to happen.

The difference on this level is that the sprite is being displayed slightly larger than it is elsewhere… though still smaller than the original 256x256 size.  My game uses a variable-size grid, and these sprites scale to fill each grid square.  The problem level has the smallest grid size in the game - 3x3 - so the sprites are drawn larger there than anywhere else in the level.

Is there some memory-allocation-check I can use to verify that this issue is related to texture size?

Hi @Sunstone Games,

You can use the following code to check for actual texture memory consumed. It helps to run this on a repeating timer of 1 second or so, and monitor how it changes when you add or remove display objects from the stage.

[lua]

local function memCheck()

    collectgarbage(“collect”)

    local memUsage_str = string.format( “MEMORY = %.3f KB”, collectgarbage( “count” ) )

    print( memUsage_str, "TEXTURE = "…(system.getInfo(“textureMemoryUsed”)/1048576) )

end

timer.performWithDelay( 1000, memCheck, 0 )

[/lua]

That being said, a valid 256x256 texture should not be causing any memory issues. There might be some issue with the file itself. You should check through the list of “requirements” for images here:

http://docs.coronalabs.com/api/library/display/newImage.html

Brent