At 12:05 PM -0700 4/28/09, Jon Webb wrote: >I have a clue -- the OutOfMemoryError went away when I set debuggable >to false. Does that help?
No joy here, I'm afraid. I really hoped this would be it. (Debuggable changing garbage collection behavior or something...) I just happened to have a section of code that blows up reliably after a opening and then closing the G1 screen. Setting debuggable="false" had no effect. Going into set content view I garbage collect and then I have 972K on a 3.2 MB heap: 04-28 13:00:14.375 setContentView(v) b4 memory: T:3284960 - F:971728 (bytes) But during inflation, ~540ms later: 04-28 13:00:14.915 E/dalvikvm-heap( 677): 62500-byte external allocation too large for this process. 04-28 13:00:14.915 E/ ( 677): VM won't let us allocate 62500 bytes 04-28 13:00:14.915 D/AndroidRuntime( 677): Shutting down VM 04-28 13:00:14.955 E/AndroidRuntime( 677): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget 04-28 13:00:14.955 E/AndroidRuntime( 677): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 04-28 13:00:14.955 E/AndroidRuntime( 677): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:290) 04-28 13:00:14.955 E/AndroidRuntime( 677): at android.graphics.drawable.Drawable.createFromStream(Drawable.java:635) 04-28 13:00:14.955 E/AndroidRuntime( 677): at android.content.res.Resources.loadDrawable(Resources.java:1454) 04-28 13:00:14.955 E/AndroidRuntime( 677): at android.content.res.Resources.getDrawable(Resources.java:498) 04-28 13:00:14.955 E/AndroidRuntime( 677): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:143) 04-28 13:00:14.955 E/AndroidRuntime( 677): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:716) 04-28 13:00:14.955 E/AndroidRuntime( 677): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:667) 04-28 13:00:14.955 E/AndroidRuntime( 677): at android.content.res.Resources.loadDrawable(Resources.java:1439) 04-28 13:00:14.955 E/AndroidRuntime( 677): at android.content.res.TypedArray.getDrawable(TypedArray.java:520) 04-28 13:00:14.955 E/AndroidRuntime( 677): at android.view.View.<init>(View.java:1674) 04-28 13:00:14.955 E/AndroidRuntime( 677): at android.view.View.<init>(View.java:1622) 04-28 13:00:14.955 E/AndroidRuntime( 677): ... 31 more I don't see the system (1.1) garbage collecting or trying to grow the heap though when it gets into this kind of trouble... A full release build (with logging off and debuggable off and javac debug off) also blows up in the same way. So am I really out of memory or just chasing my tail? This is a big screen, for sure. But then, the system loaded it once, then again in landscape -- then blew up the third time going back to portrait. I am forcing a garbage collect each onResume(), ddms shows the heap steady-states through all this -- no obvious leakage. -- Ward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

