- Home /
Android tablet crashes depending on texture compression
Well I just finished my first Unity/Android project and I face a problem:
If I run it on Samsung Galaxy S2 it's fine (high battery consumption though).
If I run it on Samsung Galaxy Tab 2(P5100) it crashes when it loads the scene.
As far as i know at that time the resources are loaded.. and I saw (command line) the memory of the tablet to drop down to 5MB when loading the scene, that's why I believe Android closes the app. After some research I discovered that an object of my project (plane) that uses multiple textures (54 frames to seems like a move of a person) causes the crash. It is not symptomatic: In the inspector, in the texture type if the 54 textures are in GUI texture type it crashes, but if they are in Texture texture type it does not. If I Resource.Load these 54 textures during runtime then it crashes at exactly the time the textures are loaded.
So, we are talking about the same .apk (about 25MB) that has been built with PVRTC and quality settings fantastic.
There are 425 Assets (350 of them are Resources) as I saw in the Editor.log.
Texture type to Texture it makes the texture seem blurred and needs less memory:
Textures 102.0 mb 90.3%
Meshes 0.0 kb 0.0%
Animations 0.0 kb 0.0%
Sounds 6.7 mb 6.0%
Shaders 0.4 kb 0.0%
Other Assets 137.4 kb 0.1%
Levels 40.1 kb 0.0%
Scripts 66.8 kb 0.1%
Included DLLs 2.6 mb 2.3%
File headers 1.4 mb 1.2%
Complete size 113.0 mb 100.0%
Texture type to GUI makes the texture seem perfect on GS2 but crashes the app on Tab (maybe because it needs more memory:
Textures 86.3 mb 88.7%
Meshes 0.0 kb 0.0%
Animations 0.0 kb 0.0%
Sounds 6.7 mb 6.9%
Shaders 0.4 kb 0.0%
Other Assets 137.4 kb 0.1%
Levels 40.1 kb 0.0%
Scripts 66.8 kb 0.1%
Included DLLs 2.6 mb 2.7%
File headers 1.4 mb 1.4%
Complete size 97.3 mb 100.0%
Is it a memory problem? What compression should I use for these textures? Is my PVRTC build a correct idea?
Any ideas would be appreciated as I am running at of time and patience.I have searched this a lot so you are my last hope guys.. I use Unity Pro 3.5.5 and Android Pro.
Thank you in advance.
I think I'm experiencing a similar issue. In my case though, reducing the number of textures will allow device to load the scene but multiple reloads will crash it. From my testing it seems to be a Android 2.3 problem, as I can't reproduce it in ICS. What versions are you running? Have you tried logcat to get a description of error?
Your answer
Follow this Question
Related Questions
Android Texture Compression with RGBA 1 Answer
Difficulty publishing for android device 1 Answer
My mobile game crashes once a certain number of textures have been loaded. What can I do about that? 0 Answers
Android: Preparing textures for 16-bit compression 1 Answer
iOs weird textures (good on android) the reason? How to fix ? 1 Answer