I am implementing an app that uses Google Maps. During debugging I found an interesting error which you can easily reproduce (I hope). If you test the Hello MapView example from Google:
http://developer.android.com/guide/tutorials/views/hello-mapview.html
The error: If you slide to any direction fast (try diagonal direction), for a period of time, you will probably get the following error:
02-28 15:59:45.138: D/dalvikvm(26484): GC_CONCURRENT freed 2K, 13% free 18870K/21639K, paused 2ms+4ms
02-28 15:59:45.911: D/dalvikvm(26484): GC_FOR_ALLOC freed 1603K, 20% free 17396K/21639K, paused 14ms
02-28 15:59:45.911: I/dalvikvm-heap(26484): Grow heap (frag case) to 18.546MB for 1560976-byte allocation
02-28 15:59:45.942: D/dalvikvm(26484): GC_CONCURRENT freed 1K, 13% free 18919K/21639K, paused 2ms+2ms
02-28 15:59:54.271: D/dalvikvm(26484): GC_CONCURRENT freed 2794K, 19% free 17649K/21639K, paused 2ms+2ms
02-28 15:59:58.497: D/dalvikvm(26484): GC_CONCURRENT freed 856K, 18% free 17880K/21639K, paused 5ms+3ms
02-28 16:00:04.341: D/dalvikvm(26484): GC_CONCURRENT freed 1003K, 17% free 18063K/21639K, paused 4ms+4ms
02-28 16:00:11.083: D/skia(26484): ------- imageref_ashmem create failed <(null)> 131072
02-28 16:00:11.091: D/skia(26484): ------- imageref_ashmem create failed <(null)> 131072
02-28 16:00:11.614: D/skia(26484): ------- imageref_ashmem create failed <(null)> 131072
02-28 16:00:11.614: D/skia(26484): ------- imageref_ashmem create failed <(null)> 131072
02-28 16:00:11.638: D/skia(26484): ------- imageref_ashmem create failed <(null)> 131072
02-28 16:00:11.646: D/dalvikvm(26484): GC_CONCURRENT freed 1097K, 16% free 18222K/21639K, paused 2ms+6ms
02-28 16:00:11.646: D/skia(26484): ------- imageref_ashmem create failed <(null)> 131072
02-28 16:00:11.646: D/skia(26484): ------- imageref_ashmem create failed <(null)> 131072
The map crashes. Any idea how to solve this?
Think Google Maps crashes with OutOfMemoryError I catched it few times on my HTC Wildfire. It can be easly reproduced on devices with small heap memory. When you slide (resize) fast you will exceed all your heap. Think that garbage collector in some cases can't release memory so fast and you running into out of memory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With