[android-developers] Re: OOM errors during inflation

2009-04-09 Thread Niek
Hi Romain, Thanks a lot for your answer: this should definitely help fix the issue! In fact, I wouldn't be surprised if a lot of posts regarding OutOfMemory issues are caused by the same problem. However, I think many hours of bug hunting could have been prevented if this 'recycler' point was me

[android-developers] Re: OOM errors during inflation

2009-04-09 Thread Romain Guy
There is no memory leak in LayoutInflater. While this is never a proof, it's something we never encountered in any of the apps we wrote. Also, the Android team works very hard to plug all the memory leaks we can find and when we tell developers to use less memory it's when we're pretty sure that t

[android-developers] Re: OOM errors during inflation

2009-04-09 Thread Niek
Hi guys, I've read several posts from developers having OutOfMemory issues, and a lot of them seem to be related to lists. I'm having a similar issue, and the root of the problem seems to be a memory leak in the inflation process. The problem is particularly tricky to track down, because as of y

[android-developers] Re: OOM errors during inflation

2009-04-08 Thread Dianne Hackborn
On Wed, Apr 8, 2009 at 8:27 AM, Ward Willats wrote: > If you do a (nested) series of startActivtyForResult() (say 2-3) is > the view hierarchy of the parent held in memory (yes, I think). Yes. > If so, would a good strategy be to setContentView( null ) in onStop() > of the invoker and put it

[android-developers] Re: OOM errors during inflation

2009-04-07 Thread Dianne Hackborn
On Tue, Apr 7, 2009 at 2:03 PM, Ward Willats wrote: > (I mean, if I make a really small 4 bit indexed color png (no alpha) > does it get "blown up" to RGB_888 or ARGB in the view buffers before > being composited and handed to frame buffer memory?) They will generally either be loaded to 16bpp

[android-developers] Re: OOM errors during inflation

2009-04-07 Thread Dianne Hackborn
You probably have large bitmaps or a lot of bitmaps, whose allocation I believe does not show up in hat. (Note that I am pretty sure the error message you are seeing is in fact due to a failing bitmap allocation.) On Tue, Apr 7, 2009 at 10:40 AM, Ward Willats wrote: > > I got a dump and jhat wo

[android-developers] Re: OOM errors during inflation

2009-04-03 Thread fadden
On Apr 3, 2:22 pm, Ward Willats wrote: > Are there any tools besides ddms to look at the heap? My app is using > over 2 MB just sitting there -- and the ddms "track allocations" > don't add up to near that amount. How can I get a good picture of > what is going on in heapville? If you're on the

[android-developers] Re: OOM errors during inflation

2009-04-03 Thread Ward Willats
Okay, starting to debug this by printing out Runtime() memory stats around setContentView(). There is less memory available than ddms says (500K vs 1.5 MB). So maybe it is really running out. Are there any tools besides ddms to look at the heap? My app is using over 2 MB just sitting there --