Hi there,
We’ve got an out of memory crash happening when exiting our android app. It appears to be when the OS tries to make a screenshot of the app so it can put the app in to the background mode. This wasn’t occurring before we upgraded to 5.6 and it only affects a Samsung S5 running 6.0.1.
We have another device a Samsung Tab running 5.0 and it’s fine.
I tried to submit a bug report but the project is too large and the bug reporter ironically keeps crashing after uploading a couple of hundred mb. I tried building and running an apk from an empty project using 5.6 but the problem device does not crash on exit of this app. So it’s hard to know where the blame lies and I can’t create a bug report with a simpler project.
The crash is so strange. I’m able to play our game for hours, loading and dumping 100’s of memory hungry scenes and the device holds up. It’s only when it exits for whatever reason (switching out to a browser, or just hitting the home button) then the app crashes. I’ll attach the log I captured using logcat to see if that helps.
Any help much appreciated, thanks!!!
04-14 11:07:55.214 14423 14423 E AndroidRuntime: FATAL EXCEPTION: main
04-14 11:07:55.214 14423 14423 E AndroidRuntime: Process: [### edited, this had our bundle id here ###], PID: 14423
04-14 11:07:55.214 14423 14423 E AndroidRuntime: java.lang.Error: FATAL EXCEPTION [main]
04-14 11:07:55.214 14423 14423 E AndroidRuntime: Unity version : 5.6.0f3
04-14 11:07:55.214 14423 14423 E AndroidRuntime: Device model : samsung SM-G900I
04-14 11:07:55.214 14423 14423 E AndroidRuntime: Device fingerprint: samsung/kltedv/klte:6.0.1/MMB29M/G900IDVU1CPL1:user/release-keys
04-14 11:07:55.214 14423 14423 E AndroidRuntime:
04-14 11:07:55.214 14423 14423 E AndroidRuntime: Caused by: java.lang.OutOfMemoryError: Failed to allocate a 26211852 byte allocation with 10635816 free bytes and 10MB until OOM
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.graphics.Bitmap.nativeCreate(Native Method)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.graphics.Bitmap.createBitmap(Bitmap.java:975)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.graphics.Bitmap.createBitmap(Bitmap.java:946)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.graphics.Bitmap.createBitmap(Bitmap.java:877)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:753)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at com.unity3d.player.i.onLayoutChange(Unknown Source)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.View.layout(View.java:17947)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:5812)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:281)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.View.layout(View.java:17938)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:5812)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1742)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.View.layout(View.java:17938)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:5812)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:281)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:3193)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.View.layout(View.java:17938)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:5812)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2666)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2367)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1437)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7397)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:695)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:631)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.os.Looper.loop(Looper.java:158)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7224)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
04-14 11:07:55.214 14423 14423 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
