Last modified: 2014-09-22 20:35:42 UTC
The current Play store version and recent nightlies crash with a Java memory error soon after login. I've replicated this on three different devices (Android 2.3.7, 4.1.1, and 4.2.2). It will crash, then attempt to start again and almost immediately crash again. USER_COMMENT=after a minute or so of browsing my feed, app crashed. ANDROID_VERSION=4.2.2 APP_VERSION_NAME=1.0beta9 BRAND=htc PHONE_MODEL=One X CUSTOM_DATA= STACK_TRACE=java.lang.OutOfMemoryError at java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:122) at com.android.volley.toolbox.BasicNetwork.entityToBytes(BasicNetwork.java:215) USER_COMMENT=crashes soon after login ANDROID_VERSION=2.3.7 APP_VERSION_NAME=1.0alpha1 BRAND=verizon_wwe PHONE_MODEL=ADR6300 CUSTOM_DATA= STACK_TRACE=java.lang.OutOfMemoryError at com.android.volley.toolbox.ByteArrayPool.getBuf(ByteArrayPool.java:101) at com.android.volley.toolbox.PoolingByteArrayOutputStream.<init>(PoolingByteArrayOutputStream.java:53) at com.android.volley.toolbox.BasicNetwork.entityToBytes(BasicNetwork.java:202) at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:104) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:105) USER_COMMENT= ANDROID_VERSION=4.1.1 APP_VERSION_NAME=1.0alpha1 BRAND=samsung PHONE_MODEL=GT-I9100 CUSTOM_DATA= STACK_TRACE=java.lang.OutOfMemoryError at com.android.volley.toolbox.ByteArrayPool.getBuf(ByteArrayPool.java:101) at com.android.volley.toolbox.PoolingByteArrayOutputStream.<init>(PoolingByteArrayOutputStream.java:53) at com.android.volley.toolbox.BasicNetwork.entityToBytes(BasicNetwork.java:202) at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:104) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:105)
https://github.com/wikimedia/apps-android-commons/pull/42 fixes it on my emulated Nexus One (real one isn't handy right now at Wikimania). I basically just took out the in-memory bitmap cache. Instead if we pull an image from cache it'll load from Volley's on-disk cache and decode the jpg/png again. Nexus One has a ridiculously low per-process memory limit (24mb????) so 1/8 of that makes a big difference. (I'm also not 100% sure if the cache size limit was working as intended, the numbers look weird.) Yuvi, does this seem to trigger any perf issues on devices that do have the ram?
Change 78358 had a related patch set uploaded by SuchABot: bug 50733: Fix OOM error on low-memory devices https://gerrit.wikimedia.org/r/78358
As noted on the github pull req this does make things a little more herky-jerky, so we'll try only disabling the cache on low-memory devices.
Change 80491 had a related patch set uploaded by Yuvipanda: bug 50733: Fix OOM error on low-memory devices https://gerrit.wikimedia.org/r/80491
Change 80491 merged by Yuvipanda: bug 50733: Fix OOM error on low-memory devices https://gerrit.wikimedia.org/r/80491
Change 78358 abandoned by Yuvipanda: bug 50733: Fix OOM error on low-memory devices https://gerrit.wikimedia.org/r/78358
changing status back to New and downgrading to Major, since the patch only affects low-memory devices but some OOM crashes happen even on devices with lots of memory.
As the Mobile Apps Team is focussing on the new, native Wikipedia app, the Commons app is no longer being maintained by the Wikimedia Foundation. I am WONTFIXing all open Commons app bugs to reflect that we will not be spending time fixing them. For the full story, see this thread on mobile-l: https://lists.wikimedia.org/pipermail/mobile-l/2014-September/thread.html#7974