I have an application that uses the Google Maps MapView component and
I've found that this crash is far and away the most common report in
my market publisher dashboard. I'm not sure what I can do about it
aside from reducing my own memory consumption. I know that will help
some, but it doesn't seem like it will fully solve this problem (since
sometimes the memory requests are the size of the entire heap). Are
there any known solutions to this?

Some of the stacktraces start with lines telling me how much was
requested:
java.lang.OutOfMemoryError: bitmap size exceeds VM budget(Heap
Size=16775KB, Allocated=11760KB, Bitmap Size=16055KB)
java.lang.OutOfMemoryError: bitmap size exceeds VM budget(Heap
Size=18311KB, Allocated=13082KB, Bitmap Size=14342KB)
java.lang.OutOfMemoryError: bitmap size exceeds VM budget(Heap
Size=18896KB, Allocated=14683KB, Bitmap Size=9620KB)
java.lang.OutOfMemoryError: bitmap size exceeds VM budget(Heap
Size=16519KB, Allocated=11198KB, Bitmap Size=16813KB)
java.lang.OutOfMemoryError: bitmap size exceeds VM budget(Heap
Size=11435KB, Allocated=9983KB, Bitmap Size=12261KB)
java.lang.OutOfMemoryError: bitmap size exceeds VM budget(Heap
Size=10487KB, Allocated=8670KB, Bitmap Size=13394KB)
etc.

These bitmap sizes just seem particularly huge and I don't know why
GMaps would be trying to allocate a single bitmap that size. Should I
really be expecting that much free space to be available in the native
bitmap heap? I do understand that some devices count the bitmap heap
against the VM heap and some devices don't.

I found this on stackoverflow with no real solution:
http://stackoverflow.com/questions/5066102/google-api-mapview-outofmemoryerror-problems

full stacktrace:

java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:677)
at com.google.android.maps.ZoomHelper.createSnapshot(ZoomHelper.java:
444)
at com.google.android.maps.ZoomHelper.beginZoom(ZoomHelper.java:194)
at com.google.android.maps.MapView$2.onScaleBegin(MapView.java:371)
at
android.view.ScaleGestureDetector.onTouchEvent(ScaleGestureDetector.java:
216)
at com.google.android.maps.MapView.onTouchEvent(MapView.java:646)
at
com.redfin.android.view.GesturedMapView.onTouchEvent(GesturedMapView.java:
183)
at android.view.View.dispatchTouchEvent(View.java:3778)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:920)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:959)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:959)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:959)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:959)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:959)
at com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1716)
at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:
1124)
at android.app.Activity.dispatchTouchEvent(Activity.java:2125)
at com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1700)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1822)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:5068)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to