Hi, All

I'm now facing a very strange out of memory issue on Nexus One.

I have a user leaves a comment in market said that my app always got force
closed on his Nexus One, then I try to contact that user and ask for the
logcat. Here's the logcat:

E/AndroidRuntime( 4016): FATAL EXCEPTION: main
E/AndroidRuntime( 4016): java.lang.OutOfMemoryError: bitmap size
exceeds VM budget
E/AndroidRuntime( 4016):        at android.graphics.Bitmap.nativeCreate(Native 
Method)
E/AndroidRuntime( 4016):        at
android.graphics.Bitmap.createBitmap(Bitmap.java:468)
E/AndroidRuntime( 4016):        at
android.graphics.Bitmap.createBitmap(Bitmap.java:435)
E/AndroidRuntime( 4016):        at
android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340)
E/AndroidRuntime( 4016):        at
android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488)
E/AndroidRuntime( 4016):        at
android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462)
E/AndroidRuntime( 4016):        at
android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323)
E/AndroidRuntime( 4016):        at
android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
E/AndroidRuntime( 4016):        at
android.content.res.Resources.loadDrawable(Resources.java:1767)
E/AndroidRuntime( 4016):        at
android.content.res.Resources.getDrawable(Resources.java:588)
E/AndroidRuntime( 4016):        at
android.widget.ImageView.resolveUri(ImageView.java:489)
E/AndroidRuntime( 4016):        at
android.widget.ImageView.setImageResource(ImageView.java:274)
E/AndroidRuntime( 4016):        at
xcxin.filexpert.FileAdapter.getView(FileAdapter.java:273)
E/AndroidRuntime( 4016):        at
android.widget.AbsListView.obtainView(AbsListView.java:1294)
E/AndroidRuntime( 4016):        at
android.widget.GridView.makeAndAddView(GridView.java:1219)
E/AndroidRuntime( 4016):        at 
android.widget.GridView.makeRow(GridView.java:265)
E/AndroidRuntime( 4016):        at 
android.widget.GridView.fillDown(GridView.java:218)
E/AndroidRuntime( 4016):        at 
android.widget.GridView.fillGap(GridView.java:185)
E/AndroidRuntime( 4016):        at
android.widget.AbsListView.trackMotionScroll(AbsListView.java:2944)
E/AndroidRuntime( 4016):        at
android.widget.AbsListView$FlingRunnable.run(AbsListView.java:2485)
E/AndroidRuntime( 4016):        at 
android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 4016):        at 
android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 4016):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 4016):        at
android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 4016):        at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4016):        at 
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 4016):        at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 4016):        at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 4016):        at dalvik.system.NativeStart.main(Native Method)

As we all could see, we have an out of memory issue here, here's the
code that cause this exception:

vh.iv.setImageResource(R.drawable.zip);

I try to render a item with image.

The problem is that this app works great on other phones, include HTC
Dream, which only has 192MB of RAM, but Nexus One has 512MB of RAM. So
if it's really the memory leak issue, why it's not in Dream?

Does anyone has the same issue? How do you solve that?

Thank you & BRs,

Alex

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

Reply via email to