Page MenuHomeGitPull.it

Fix crash caused by OutOfMemoryError in DiskBasedCache.java:391 on version 2.3.1
Open, HighPublic

Description

Dear Developers of the amazing Free/Libre and Open Source app Libre BusTO ,
Please triage my crash:

Version code:
62

Version name:
2.3.1

Android version:
14

Phone:
2211133G

Brand:
Xiaomi

Stack:
java.lang.OutOfMemoryError: Failed to allocate a 1514720 byte allocation with 1791440 free bytes and 1749KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
	at com.android.volley.toolbox.DiskBasedCache.streamToBytes(DiskBasedCache.java:391)
	at com.android.volley.toolbox.DiskBasedCache.get(DiskBasedCache.java:162)
	at com.android.volley.CacheDispatcher.processRequest(CacheDispatcher.java:131)
	at com.android.volley.CacheDispatcher.processRequest(CacheDispatcher.java:115)
	at com.android.volley.CacheDispatcher.run(CacheDispatcher.java:93)


logcat (last 50 lines):
01-07 21:28:28.915 I/BusTO:MatoRepository(22808): Requesting info for trip id: gtt:20757161U
01-07 21:28:28.916 I/BusTO:MatoRepository(22808): Requesting info for trip id: gtt:20757182U
01-07 21:28:28.916 I/BusTO:MatoRepository(22808): Requesting info for trip id: gtt:20757188U
01-07 21:28:28.916 I/BusTO:MatoRepository(22808): Requesting info for trip id: gtt:20757225U
01-07 21:28:28.916 I/BusTO:MatoRepository(22808): Requesting info for trip id: gtt:26317002U
01-07 21:28:28.916 I/BusTO:MatoRepository(22808): Requesting info for trip id: gtt:26316984U
01-07 21:28:28.916 I/BusTO:MatoRepository(22808): Requesting info for trip id: gtt:26317179U
01-07 21:28:28.916 I/BusTO:MatoRepository(22808): Requesting info for trip id: gtt:26317350U
01-07 21:28:28.992 D/TrafficStats(22808): tagSocket(169) with statsTag=0x164dc738, statsUid=-1
01-07 21:28:29.012 I/eyboz.bustorino(22808): Clamp target GC heap from 292MB to 256MB
01-07 21:28:29.038 I/eyboz.bustorino(22808): Starting a blocking GC Alloc
01-07 21:28:29.038 I/eyboz.bustorino(22808): Starting a blocking GC Alloc
01-07 21:28:29.055 I/eyboz.bustorino(22808): Clamp target GC heap from 348MB to 256MB
01-07 21:28:29.055 I/eyboz.bustorino(22808): Alloc concurrent mark compact GC freed 1812KB AllocSpace bytes, 82(1832KB) LOS objects, 1% free, 252MB/256MB, paused 275us,797us total 16.801ms
01-07 21:28:29.055 I/eyboz.bustorino(22808): WaitForGcToComplete blocked Background on Alloc for 10.322ms
01-07 21:28:29.056 I/eyboz.bustorino(22808): Starting a blocking GC Alloc
01-07 21:28:29.056 I/eyboz.bustorino(22808): Starting a blocking GC Alloc
01-07 21:28:29.072 I/eyboz.bustorino(22808): Clamp target GC heap from 349MB to 256MB
01-07 21:28:29.072 I/eyboz.bustorino(22808): Alloc concurrent mark compact GC freed 184KB AllocSpace bytes, 19(420KB) LOS objects, 0% free, 253MB/256MB, paused 277us,666us total 16.376ms
01-07 21:28:29.073 I/eyboz.bustorino(22808): Forcing collection of SoftReferences for 1479KB allocation
01-07 21:28:29.073 I/eyboz.bustorino(22808): Starting a blocking GC Alloc
01-07 21:28:29.090 I/eyboz.bustorino(22808): Clamp target GC heap from 350MB to 256MB
01-07 21:28:29.090 I/eyboz.bustorino(22808): Alloc concurrent mark compact GC freed 300KB AllocSpace bytes, 41(884KB) LOS objects, 0% free, 254MB/256MB, paused 310us,1.901ms total 17.494ms
01-07 21:28:29.094 W/eyboz.bustorino(22808): Throwing OutOfMemoryError "Failed to allocate a 1514715 byte allocation with 1376976 free bytes and 1344KB until OOM, target footprint 268435456, growth limit 268435456" (VmSize 9110212 kB)
01-07 21:28:29.095 I/eyboz.bustorino(22808): Starting a blocking GC Alloc
01-07 21:28:29.095 I/eyboz.bustorino(22808): Starting a blocking GC Alloc
01-07 21:28:29.112 I/eyboz.bustorino(22808): Clamp target GC heap from 350MB to 256MB
01-07 21:28:29.112 I/eyboz.bustorino(22808): Alloc concurrent mark compact GC freed 632KB AllocSpace bytes, 30(812KB) LOS objects, 0% free, 254MB/256MB, paused 302us,736us total 17.064ms
01-07 21:28:29.112 I/eyboz.bustorino(22808): Forcing collection of SoftReferences for 1479KB allocation
01-07 21:28:29.112 I/eyboz.bustorino(22808): Starting a blocking GC Alloc
01-07 21:28:29.127 I/eyboz.bustorino(22808): Clamp target GC heap from 350MB to 256MB
01-07 21:28:29.127 I/eyboz.bustorino(22808): Alloc concurrent mark compact GC freed 240KB AllocSpace bytes, 45(960KB) LOS objects, 0% free, 254MB/256MB, paused 264us,769us total 14.524ms
01-07 21:28:29.127 W/eyboz.bustorino(22808): Throwing OutOfMemoryError "Failed to allocate a 1514720 byte allocation with 1791440 free bytes and 1749KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC." (VmSize 9127184 kB)
--------- beginning of crash
01-07 21:28:29.131 E/AndroidRuntime(22808): FATAL EXCEPTION: Thread-11
01-07 21:28:29.131 E/AndroidRuntime(22808): Process: it.reyboz.bustorino, PID: 22808
01-07 21:28:29.131 E/AndroidRuntime(22808): java.lang.OutOfMemoryError: Failed to allocate a 1514720 byte allocation with 1791440 free bytes and 1749KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
01-07 21:28:29.131 E/AndroidRuntime(22808): 	at com.android.volley.toolbox.DiskBasedCache.streamToBytes(DiskBasedCache.java:391)
01-07 21:28:29.131 E/AndroidRuntime(22808): 	at com.android.volley.toolbox.DiskBasedCache.get(DiskBasedCache.java:162)
01-07 21:28:29.131 E/AndroidRuntime(22808): 	at com.android.volley.CacheDispatcher.processRequest(CacheDispatcher.java:131)
01-07 21:28:29.131 E/AndroidRuntime(22808): 	at com.android.volley.CacheDispatcher.processRequest(CacheDispatcher.java:115)
01-07 21:28:29.131 E/AndroidRuntime(22808): 	at com.android.volley.CacheDispatcher.run(CacheDispatcher.java:93)
01-07 21:28:29.131 E/ACRA    (22808): ACRA caught a OutOfMemoryError for it.reyboz.bustorino
01-07 21:28:29.131 E/ACRA    (22808): java.lang.OutOfMemoryError: Failed to allocate a 1514720 byte allocation with 1791440 free bytes and 1749KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
01-07 21:28:29.131 E/ACRA    (22808): 	at com.android.volley.toolbox.DiskBasedCache.streamToBytes(DiskBasedCache.java:391)
01-07 21:28:29.131 E/ACRA    (22808): 	at com.android.volley.toolbox.DiskBasedCache.get(DiskBasedCache.java:162)
01-07 21:28:29.131 E/ACRA    (22808): 	at com.android.volley.CacheDispatcher.processRequest(CacheDispatcher.java:131)
01-07 21:28:29.131 E/ACRA    (22808): 	at com.android.volley.CacheDispatcher.processRequest(CacheDispatcher.java:115)
01-07 21:28:29.131 E/ACRA    (22808): 	at com.android.volley.CacheDispatcher.run(CacheDispatcher.java:93)

Thank you! :)

Generated with https://lab.reyboz.it/libre-busto/crash-report/ (P15)

Details

Reported By (original)
fabio.mazza

Event Timeline

I think it's possible that the map takes way too much memory.

Reported again by the kind user Ri. Ga. with comment (EN):

«I was moving the map»

Raising priority because it's confirmed on multiple devices. But we don't have a solution right now. Patch welcome.

fabio.mazza raised the priority of this task from Normal to High.Fri, Apr 11, 11:43

Working on substituting the map with MapLibre SDK, I have realized that we have too many markers on the map (with the MapLibre, they say the should not be more than 50 to 100... I think we get way more).

The replacement map with the MapLibre SDK will fix this, and I hope the memory consumption goes down.