redfist / google-mobile-dev

Automatically exported from code.google.com/p/google-mobile-dev
0 stars 0 forks source link

App-crashing exception in low memory conditions #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
We experience a low memory situation in one of our apps occasionally, and the 
Google Ad Unit sometimes causes a crash with this stacktrace:
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
       at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
       at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:464)
       at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:340)
       at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
       at android.content.res.Resources.loadDrawable(Resources.java:1705)
       at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
       at android.widget.PopupWindow.<init>(PopupWindow.java:167)
       at android.widget.PopupWindow.<init>(PopupWindow.java:151)
       at android.widget.PopupWindow.<init>(PopupWindow.java:142)
       at com.google.ads.GoogleAdOverlay.<init>(GoogleAdOverlay.java:36)
       at com.google.ads.GoogleAdView.init(GoogleAdView.java:201)
       at com.google.ads.GoogleAdView.<init>(GoogleAdView.java:160)

We will wrap this in our own try {} catch and not show an ad in this case, but 
it would be better if the framework itself would make sure to never crash the 
app.

Original issue reported on code.google.com by math...@gmail.com on 24 Nov 2010 at 11:22

GoogleCodeExporter commented 8 years ago
This is Platform-Android of course, not iOS.

Original comment by math...@gmail.com on 24 Nov 2010 at 11:22

GoogleCodeExporter commented 8 years ago
AFMA superseded by Google AdMob Ads SDK.

Original comment by wesgood...@google.com on 26 Jul 2011 at 10:32