Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Issue Samsung devices #11

Open
antoniomadrigal10 opened this issue Aug 27, 2014 · 4 comments
Open

Memory Issue Samsung devices #11

antoniomadrigal10 opened this issue Aug 27, 2014 · 4 comments

Comments

@antoniomadrigal10
Copy link

I have an issue on samsung devices, i get the this error when start using the library and this only happens on S4 and S3, i have tested on Nexus 4 and Xperia L1 without this error?

could you help me please!!

08-27 13:11:48.045: E/dalvikvm-heap(21470): Out of memory on a 1684-byte allocation.
08-27 13:11:48.050: I/dalvikvm(21470): "main" prio=5 tid=1 RUNNABLE
08-27 13:11:48.050: I/dalvikvm(21470): | group="main" sCount=0 dsCount=0 obj=0x41d20578 self=0x41c456a8
08-27 13:11:48.050: I/dalvikvm(21470): | sysTid=21470 nice=0 sched=0/0 cgrp=apps handle=1074466812
08-27 13:11:48.050: I/dalvikvm(21470): | state=R schedstat=( 37714548370 2517839095 71736 ) utm=3554 stm=216 core=3
08-27 13:11:48.050: I/dalvikvm(21470): at java.lang.AbstractStringBuilder.enlargeBuffer(AbstractStringBuilder.java:~94)
08-27 13:11:48.050: I/dalvikvm(21470): at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:124)
08-27 13:11:48.050: I/dalvikvm(21470): at java.lang.StringBuffer.append(StringBuffer.java:278)
08-27 13:11:48.050: I/dalvikvm(21470): at java.io.StringWriter.write(StringWriter.java:123)
08-27 13:11:48.050: I/dalvikvm(21470): at java.io.PrintWriter.doWrite(PrintWriter.java:623)
08-27 13:11:48.050: I/dalvikvm(21470): at java.io.PrintWriter.write(PrintWriter.java:601)
08-27 13:11:48.050: I/dalvikvm(21470): at java.io.PrintWriter.write(PrintWriter.java:579)
08-27 13:11:48.050: I/dalvikvm(21470): at java.io.PrintWriter.write(PrintWriter.java:660)
08-27 13:11:48.050: I/dalvikvm(21470): at java.io.PrintWriter.append(PrintWriter.java:722)
08-27 13:11:48.050: I/dalvikvm(21470): at java.io.PrintWriter.append(PrintWriter.java:691)
08-27 13:11:48.050: I/dalvikvm(21470): at java.io.PrintWriter.append(PrintWriter.java:31)
08-27 13:11:48.050: I/dalvikvm(21470): at java.lang.Throwable.printStackTrace(Throwable.java:330)
08-27 13:11:48.050: I/dalvikvm(21470): at java.lang.Throwable.printStackTrace(Throwable.java:306)
08-27 13:11:48.050: I/dalvikvm(21470): at android.util.Log.getStackTraceString(Log.java:400)
08-27 13:11:48.050: I/dalvikvm(21470): at android.util.Slog.e(Slog.java:151)
08-27 13:11:48.050: I/dalvikvm(21470): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:142)
08-27 13:11:48.050: I/dalvikvm(21470): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
08-27 13:11:48.050: I/dalvikvm(21470): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
08-27 13:11:48.050: I/dalvikvm(21470): at dalvik.system.NativeStart.main(Native Method)
08-27 13:11:48.050: I/Process(21470): Sending signal. PID: 21470 SIG: 9

@jpardogo
Copy link
Owner

How are you loading the images? Samsung doesn't seem to like this lib lol

@antoniomadrigal10
Copy link
Author

Im using this lib https://github.com/koush/ion to load http url images and keep them on cache!

@jpardogo
Copy link
Owner

I am not actually doing any heavy allocations with the library so I don't think the problem is library related. The Memory problems used to appear because of bitmaps allocations. Are you recycling your adapter views properly using convertView? This library should be alright but try Picasso, just in case. Investigate your memory and where allocation are taking place. If you need a reference of how ot do that , there is an old google talk that is very interesting, you can find it here

@jpardogo
Copy link
Owner

This is definitely related with the issue #8 , where Samsung devices call GC_EXPLICIT. If they call GC_EXPLICIT is because they run out of memory....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants