What might cause an Android app to freeze

Hello

So after upgrading to Unity 4.2 (I don’t know if this is significant but I just updated and I just noticed it) I’m finding my app freezing.

It doesn’t really crash it just freezes. It appears as if someone took a screenshot of my current game play and is just displaying the image.

What is even weirder is if there is sound being played the sound continues to play, so it isn’t like it crashed. (For example my music continues to play)

I’ve spent the last 6 or so hours trying to get a clue and I don’t have any.

I’m watching LogCat like crazy and there is nothing unusual at all. Unity doesn’t report anything before/during the freeze and after viewing the normal android garbage that gets spammed out I don’t see any errors of any kind.

I know it isn’t a memory problem, my game peaks at maybe 200mb. I know this isn’t the max for my device (my device is the Samsung Galaxy S3 and it has 2gb of ram). Before I did a lot of memory performances I’ve visually seen my app take 290mb of ram, so I know there is plenty of ram.

As for general lag I have a FPS script that I got from the wiki and it never goes below 18. It averages at around 27 during heavy load and around 40 under normal operation.

I thought perhaps it was an overheating problem but I’m not sure. I decided to unplug my phone (so it isn’t getting heat from charging) and put a fan on max on my phone while playing. It still freezes even though the phone is warm to the touch.

Below is some information I recorded in all my testing.

(My game is a tower defense game so that is what I’m referring to when I say wave)

CRASH REPORTING:

--------------------------------------------------------------------------------------------------
REFERENCE: [1]
	[Everything on. High detail, terrain, very high detail, all sounds. vibration on]
	[development mode on, script debugging on, usb plugged in and watching LogCat]
crashed on wave: 8

crashed on wave: 8 both space ships are top left of screen; 168.03MB ram, CPU 48%

Crashed on wave: 10 just randomly in the middle; 75 life; 1137 money. 168.61MB, cpu 49%

crashed on wave: 9 last few enemies were close to end; 87 life; 789 money. 167.04mb, cpu 49.59%
--------------------------------------------------------------------------------------------------


--------------------------------------------------------------------------------------------------
REFERENCE: [2]
	[everything off. no sound, no high detail. no very high detail, no vibrations, no terrain]
	[development mode on, script deggugin on, usb plugged in and watching LogCat]
no crash, lost the game on wave 17
--------------------------------------------------------------------------------------------------

//about a 25 minute break was taken, phone has cooled down but is still warm to the touch

--------------------------------------------------------------------------------------------------
REFERENCE: [3]
	[terrain on, sound on, vibrations on, terrain on. high detail & very high detail off]
	[development mode on, script debuggin on, usb plugged in and watching Logcat]
crashed on wave: 11 in the middle randomly; 87 life; 553 money. 151.54mb, cpu 50%
crashed on wave: 11 at the very end; 80 life; 909 money. 155.93mb, cpu 50.17%
[FAN]crashed on wave: 11 at the very beginning70 life, 909 money. 154.42mb, cpu 48.5%
--------------------------------------------------------------------------------------------------

//let phone cool down in front of fan for a few minutes

--------------------------------------------------------------------------------------------------
REFERENCE: [4]
	[terrain on, sound on, vibrations on. high detail & very high detail off]
	[development mode on, script debuggin on, usb NOT PLUGGED IN & not watching LogCat bc I can't]
[FAN]crashed on wave: 11 not at the VERY beginningbut at the beginning
--------------------------------------------------------------------------------------------------



--------------------------------------------------------------------------------------------------
REFERENCE: [5]
	[terrain on, sound on, vibrations OFF. high detail & very high detail off]
	[development mode on, script debuggin on, usb NOT PLUGGED IN & not watching LogCat bc I can't]
[FAN]crashed on wave: 10 in the middle; 89 life, 1923; money 151.89mb, cpu 48.35%
--------------------------------------------------------------------------------------------------





note: when I go away from the map (and it has froze) I get a log saying 
"windowFocusChanged: false
onPause
surfaces: detach glview"


normal (not frozen) log is:
"windowFocusChanged: false
onPause
PauseNativeSensors
Sensor : Accelermoter (1) ; 1.000000 / 0.01s ; MPL accel / Inversense
surfaces: detach glview
Releasing project wake-lock"

RAM REPORTING:

ram checks


--------------------------------------------------------------------
[Everything on] REFERENCE: [1]
156.34mb - main menu just started
163.30mb - wave 0 start of stormy jungle
171.89mb - wave 0 start of stormy jungle; placed all towers
199.05mb - wave 5 upgraded all towers, ready for wave 6
168.38mb - wave 7 upgraded all towers, ready for wave 8
165.45mb - wave 8 upgraded all towers, ready for wave 9
--------------------------------------------------------------------


--------------------------------------------------------------------
[Everything off] REFERENCE: [2]

123.83mb - main menu just started
105.16mb - wave 0 start of stormy jungle
136.20mb - wave 5 upgraded all towers; ready for wave 6
147.93mb - wave 7 upgraded all towers; ready for wave 8
147.20mb - wave 8 upgraded all towers; ready for wave 9
147.85mb - wave 11 upgraded all towers; ready for wave 12
171.60mb - wave 15 upgraded all towers; ready for wave 16
197.48mb - lost game on wave 17
--------------------------------------------------------------------

//about a 25 minute break was taken, phone has cooled down but is still warm to the touch

--------------------------------------------------------------------
[misc on/off] REFERENCE: [3 ]

129.89mb - main menu just started
150.69mb - wave 0 of stormy jungle
150.36mb - wave 6 upgraded all towers; ready for wave 7


--------------------------------------------------------------------

If anyone might know anything that would help me I’d appreciate it, thanks.

Turned out to be a loop with out a yield null