Possible display api bug, your experience?

Hey guys,
I really don’t know where else to look for answers for my issue. I have a eBook type app that basically loads up ALL the pages of the book (17) of them, and then during runtime I have all the page assets set to not visible except for the page behind and in front of the current page that the user is viewing. Anyways, It runs and performs perfectly on the iPhone and iPad, also runs perfect on the simulator. Now when i build for Android and test it on my device, it runs fine until i switch to about the 9th page in, and then it starts getting choppy and the following up coming pages are not displaying, i can then go back to previous pages and it stops being choppy. again if I go past the 9th page it gets choppy again and things arent displaying as they should. If i leave the app on one of the pages thats not displaying and hit my home button on my phone, then reload the app, it pulls back up on the page i left it on, and the page assets are now displaying correctly, and again if I go another 9 pages or so it begins to have issues again. Just hoping that someone can have any ideas of what might be happening with this, i feel like it could be a core corona bug, it only happens on Android on the device… Any possibility that my device is running out of memory?

Any thoughts or input is appreciated. Thanks [import]uid: 19620 topic_id: 21512 reply_id: 321512[/import]

if you are loading 17 pages that are retina sized png’s that’s 960x640x4 = 2,457,600 => 2.5 MB for each image expanded in memory and then you have 17 such pages = 34 MB apart from the other code, etc in memory. Why do you want to load all 17 at the same time? Even if you were to flip them, you would need a maximum of three that will have to cunningly swap between to provide an illusion of swapping.

If you an do a search on the tiling of graphics for Obj-C, it is a wonderful article with example that shows how an image is enlarged using tiling to eliminate the harsh memry requirements and reusing tile memory as required. Of course that is Obj-C code so will not be simply portable, but the principles are quite good to understand how to manage things better. [import]uid: 3826 topic_id: 21512 reply_id: 85214[/import]

Well the idea of loading all 17 to begin is basically so everything is in place. In my eBook all my pages are in a long line on the x axis. When i change pages i have all 17 pages in a top group that i move so all the pages are shifted when i change the page forward or backwards. So I guess perhaps I should try creating and deleting pages on changing pages rather than just making them visible or invisible? [import]uid: 19620 topic_id: 21512 reply_id: 85227[/import]

So I thought about what you said and re wrote my code so as i switch through pages pages are created and destroyed as i go along rather than just changing them visible to not visible. And that did solve the issues i was having on android. I would probly assume then that my device was having memory issues because of the several large images all at the same time. Thanks for your input, you saved me! [import]uid: 19620 topic_id: 21512 reply_id: 85410[/import]

so if you make the millions with that, you know where to send some money then :wink:

Glad it worked out for you… [import]uid: 3826 topic_id: 21512 reply_id: 85412[/import]

Hey man if I make the millions I’d be happy to hire you onto the crew haha. I’ll let you know how it goes :wink: Thanks again [import]uid: 19620 topic_id: 21512 reply_id: 85413[/import]

If you’re giving away money, then I’m in hehe. Jk yeah your device was low on mem and it looks like your problem is solved. Good luck with it and hope you make millions! [import]uid: 58885 topic_id: 21512 reply_id: 85414[/import]