This is in regards to Unity 4.3…
We failed an iOS submission because a low end device could easily crash. What the reviewer did was reload a level from the level menu over and over, I guess as part of a stress test. Within less than 10 reloads it would crash.
I then acquired an iPad mini…notorious for such problems…and tried it out. Sure enough…100% reproducible. This was really surprising to me because I am already doing the ‘GC.Collect after a level load’ thing.
So I hooked it up to the profiler and sure enough…you can load the same level over and over and the running memory grows.
So I made a test project. Empty project. Set to iOS. Pulled in a handful of random stuff from the Robots Labs sample that Unity provides…just so that there’s something in there to allocate some memory. Then I made a very simple script…uses a CoRoutine to restart the level after a few seconds. Then I just watch it in the profiler. This test project is of course very simple and nothing like a production project…but it still grows in running memory on the reloads. You need to do a lot of them to expose the issue (I let it run over lunch time…1000s of reloads), but it’s there. In any given single reload, you can’t see it because the unity memory profiler only shows one decimal place, but it’s there.
In my production project, the running memory by default is around 80 megs…and like clockwork after 5-6 reloads it will crash iPad Minis iPod Touches. Technically though…this will crash any iOS device…if you had enough time.
Anyone know anything about this?