On Friday, May 9, 2014 1:23:12 AM UTC+4, Daniel Rindt wrote:
>
> 2014-05-08 17:52 GMT+02:00 Krishna Mahadik 
> <krishna...@gmail.com<javascript:>>: 
>
> > Increase memory allocated to process bitmap. 
> > 
> > Chunk of code will be more helpful to understand what problem exactly 
> you 
> > are facing. 
>
> Thanks for your reply, have a look where the error is happen: 
> java.lang.RuntimeException: Unable to start activity 
> ComponentInfo{android/com.android.internal.app.ChooserActivity}: 
> android.view.InflateException: Binary XML file line #26: Error 
> inflating class <unknown> 
>
> This is not my code. It seems the process from the app consumes much 
> memory and by invoking the chooser its not able to inflate the layout. 
> The resulting question is what can i do to prevent such errors? 
>

Are you absolutely sure that your code does not leak memory?

Have you tried using Eclipse MAT and putting the app through the usual 
paces, like rotating the screen, pausing / restarting, etc.?

You'd mentioned the app being heavy on image processing -- is your memory 
allocation strategy based on how much memory your app's process gets? You 
can use ActivityManager#getMemoryClass for that.

It's too bad that your log does not have any memory allocation data. I'd 
consider implementing a crash handler that logs to a file, recording things 
like:

Debug.getNativeHeapAllocatedSize()
Debug.getNativeHeapFreeSize()
Runtime.getRuntime().maxMemory()
Runtime.getRuntime().totalMemory()
Runtime.getRuntime().freeMemory()
ActivityManager.getMemoryClass()

-- K

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to