Hello. I have strange problem running my game on iPad (4, mini). After 10-15 minutes of gameplay game suddenly quits. In device logs I found this:
Jul 10 20:16:43 iPad-ANDRIJ SpringBoard[49] : Application ‘UIKitApplication:com.****.[0x4f73]’ was killed by jetsam, where ’ * ’ is my game name.
In device crash logs I found crash log named “Unknown”, with information that game used 164097 pages of memory. 1 memory page in iOS = 4kb. So my game used 164097 * 4kb =~ 650 mb of ram. I used Activity Monitor tool from XCODE to inspect memory usage, and it showed me that my game was consuming max 211 mb of ram. XCODE version is 6.4, Unity version is 5.1.1 p4, iPad iOS version is 8.3. Any suggestions?
We are having a lot of issues like this. We have submitted our app to unity and they haven’t found anything yet, but I ran a test on multiple iPads this morning, and in a L2CPP build I get constant messages “Application did receive memory warning”, but in a mono build I get nothing. When running on the L2CPP build the app randomly crashes, but runs completely stable on the mono build. I get the same cryptic “UNKNOWN” crash logs.
The IL2CPP scripting backend may use slightly more memory than the Mono scripting backend, but in the latest builds we’ve made a number of improvements so that the memory usage is almost comparable. So as long as you application in not right on the edge with Mono, it should be fine with IL2CPP.
Can you let me know the bug report number for the bug with your project? I’d like to check on the status of the bug report to ensure that we are investigating it properly.
I have found the problem - it was Blur (standart image unity3d effect). Every time I turn on blur, on iPad4 cause memory leak over 10 mb. It can be seen using XCODE Instruments → Activity Monitor → Virtual Memory Usage.
1 note: we went thru today and cleaned up our shaders, and put in work arounds for the shaders to make them work on OGLES3, after that it appears the “Application did receive memory warning” messages have gone away, we are still having issues with the app crashing, and we still get messages about Garbage Collection allocating a very large block, but the iOS warnings went away, which is odd, since we didn’t really “optimize” the shaders in any way, just changed halves to floats and made the math complete explicit.