It looks like you're new here. If you want to get involved, click one of these buttons!
local button = Button.new(Bitmap.new(Texture.new("images/cell_button_yellow.png"))) button:addEventListener("click", function() stats:log("clickStartButton") --go to game scene sceneManager:changeScene("opponent", conf.transitionTime, sceneManager.fade, conf.easing) end) local buttonText = TextField.new(conf.fonts.button, "Start New Game") buttonText:setTextColor(0x000000) buttonText:setPosition(math.floor(button:getWidth()/2 - buttonText:getWidth()/2), 43) button:addChild(buttonText) button.hasGame = false button.name = "startGame" button.matchId = 0 button.index = 0 self.slider:addChild(button) |
Comments
Maybe it is causing the problem and then the fix would be:
Additionally, some of the other bitmaps showing as blank aren't buttons. Those two title background bitmaps are:
"if datasaver.LoadValue~="add" then
end"
So it does nothing.
It was resolved when i moved this code before any Bitmaps and Buttons.
Only thing I can think of is to make them all globals and do my own garbage collection on scene change, but that is messy.
the bug was happening in my lg p500 after seeing few pages not sure for ios device.
When I reorganized my sprite sheets so that not so much was loaded at once, the problem "went away". I haven't been too concerned with it because it only seemed to occur a) very rarely and b) in high memory use situations.
Try rebooting your device and see if the problem goes away. If it does, it might lend credence to the above theory and we should ask @atilim to take a look.
best regards
PS: One other suggestion. Try hanging on to the button Texture in a separate field variable so that the only reference isn't the Bitmap. I don't know why but I had a feeing that the problem might only occur when a Texture was only referenced once - by the Bitmap that was using it.
I get over it by giving timer before loading some sprites.
best regards
best regards
@atilimi, texture memory usage is 18100kb (iphone5 [640x1136 retina graphics]) on the menu screens where I get white textures. In game it can get to 26500kb but I never lose textures there.
To further support my theory on making the textures globals, the textures that are still showing on the screenshot (and didn't turn white) are the global ones - background and green square. I tried changing the textures for the button and the table headers/cells to also be global and I have since been unable to reproduce the issue.
Mine happen on the start of the App, when there is no collectgarbage happened, and at minimal Texture memory usage.
More like a clash happen on texture loading, or something like that (all of the sprite that load that one texture will become white).
Instead of using timer at loading, i also can get over from it by doing a loading the texture from texturePack. So all of my GUI images are all on one texturePack now.
If i can remember about it, i think this also happen on Corona. So i didn't report about it, as i think this was probably a usual thing.
oh I'll look at it. I agree with @bowerandy's insights. Can you execute this statement
print(application:getTextureMemoryUsage())
I have value from ~20 000 to ~40 000 Kbytes on my Samsung Galaxy S4 (resolution 1920x1080).
Can someone help me to solve this problem? I tried to restart my device, but it's didn't help me. This problem can appear and disappear suddenly and I can't understand the reason why it's happens.