Occasionally freeze on Android devices

Hi there,

we are currently in the testing phase of our game for both IOS and Android, and we encountered a strange behavior, that only affects the Android devices. The game occasionally freezes during gameplay, without leaving any error in logcat. It’s like a deadlock, the game does not quit, it just pauses without accepting any user input, and the music is played further.

We tested with several devices and Android versions (2.3.7, 4.1.2, 5.0.2), got always the same outcome. Although it is unrealistic to have an infinite loop somewhere in the code, since we have never had the issue on IOS devices (same code), I tried to use Unity Profiler to check the CPU usage. Interestingly as soon as the freeze comes the Profiler stops recording and switches back to “Editor” as “Active Profiler”.

We are right now on Unity 5.0.1f.

Any hints how to analyse such freeze?

Did you checked the differences between your platform settings? You can have some changes in the quality setting tab or for each textures settings for example.

Yes, I tried all the variations for Android settings, without success. I also played with the quality settings, yet it freezes with the minimum quality setting as well. As for our textures, they are JPEG/PNGs with truecolor, mostly 256x256 / 512x512. Since Unity uncompresses JPEG/PNG at runtime, I do not think there should be any difference with compression.

For my android project i'm using ETC compression for opaque textures and RGBA for transparents. You can try if not already done to set this in the building setting window. Also check in the player settings all the options. For example, my last crash on android was due to graphic level which was set to force OpenGL ES.3 instead of auto.

I am having the same problem, my game worked well on a higher version. After downgrading due to some system problems to the 5.0.1. my game started to crash. maybe its a bug.. have you found a soultion yet?

No, we are now concentrating on the iPhone version. As soon as we finished the release there, we get back to this issue ( hopefully in 2 weeks ).

2 Answers

2

PLEASE make a bug report!
I have the same exact thing and i did report it a while back, and the Q/A replied that it is related to PhysX of all things. They are trying to fix it but so far nothing.
It will give them a bigger sampling pool to try and fix things.

I'm not even using Physics in my game. I'm working on a 3d version of the original pacman snapped to x/z and I find this happens sometimes. Never happens on anything but Android... Would love to know more.

@jankymidget I don't know whether you have the same issue we had, but for us the 5.1.1p2 corrected the bug.

@Rick80 After a bit of play testing I found it was a problem with a method called findNextTurn() that scans forward to find the next valid turn in the desired direction for turn snapping, and in the tunnels (Pacman) there are no illegal tiles to stop it scanning out of bounds in the tile array like every other place in the maze, lol. Silly stuff.

We got the answer from Unity Support, that 5.1.1p2 corrects the issue. We are still testing it, but it looks promising.