Yalantis / Phoenix

Phoenix Pull-to-Refresh
https://yalantis.com/
Apache License 2.0
4.02k stars 920 forks source link

bug for oom #20

Closed ghost closed 9 years ago

ghost commented 9 years ago

java.lang.OutOfMemoryError at android.graphics.Bitmap.nativeCreate(Native Method) at android.graphics.Bitmap.createBitmap(Bitmap.java:822) at android.graphics.Bitmap.createBitmap(Bitmap.java:799) at android.graphics.Bitmap.createBitmap(Bitmap.java:731) at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:607) at com.yzm.sleep.sunrefresh.SunRefreshView.createBitmaps(SunRefreshView.java:109) at com.yzm.sleep.sunrefresh.SunRefreshView.initiateDimens(SunRefreshView.java:103) at com.yzm.sleep.sunrefresh.SunRefreshView$1.run(SunRefreshView.java:80) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5049) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) at dalvik.system.NativeStart.main(Native Method)

shliama commented 9 years ago

I don't know what you are doing in your app, how much memory do you use and so on. All bitmaps for this library have small size, so I'm quite sure - it's not an issue. You should check your memory usage to find an issue https://developer.android.com/tools/debugging/debugging-memory.html

ghost commented 9 years ago

mSky = Bitmap.createScaledBitmap(sky, mScreenWidth, mSkyHeight, true); if value of 'mScreenWidth ' is biggest, oom. my phone appear.