I can maybe help here. I'm an amateur, but the 'out of memory' error is a familiar adversary.
The VM only allows you to use 640k at any given time. I have a program that utilizes hundreds of large bitmap files. Here is how I decided to handle it. (It's clunky and inefficient, but it works.) -I keep solid track of how much memory is being used at any given time. Once the program gets anywhere near 500k, (Just to be safe), I find a way to call finish, recycle bitmaps, and call an intent to start a fresh activity. If it's possible to start a fresh activity when the memory limit gets close, you may want to consider that as an option. -Also, if you are using images. Load your pics into photoshop or the Gimp and make sure they physically as small as you can get them. I don't know if any of that will help, but I've learned the hard way that the 600k ceiling for memory is something you have to keep a count on. Josh Beck On Dec 9, 7:07 am, Guillaume Perrot <[EMAIL PROTECTED]> wrote: > When we have an OutOfMemoryError (either the MapView or huge images): > we have a message (in logs) like > "The VM won't allow us to allocate x bytes" or something like "VM > budget exceeded" > I think it's a VM limitation. > > On Dec 8, 11:09 pm, Mark K <[EMAIL PROTECTED]> wrote: > > > I've run into similar problems when rendering or successively > > rendering large bitmaps, can't tell if this is a specific bug, or just > > a limitation of the jvm. I haven't yet found a way to mitigate the > > problem. > > > Mark > > > On Dec 8, 12:47 pm, elephantbug <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > Our application sometimes runs out of memory, especially on the map > > > view. Below it the exception we got, anyone can give any hint about > > > what might be the cause? Is there any known issue about MapView? > > > > W/System.err( 193): OutOfMemory > > > E/MapView ( 193): IllegalStateException on drawMap. Wiping cache. > > > E/MapView ( 193): java.lang.IllegalStateException: null image > > > E/MapView ( 193): at com.google.googlenav.map.MapTile.getImage > > > (Unknown Source) > > > E/MapView ( 193): at com.google.googlenav.map.Map.a(Unknown > > > Source) > > > E/MapView ( 193): at com.google.googlenav.map.Map.drawMap > > > (Unknown Source) > > > E/MapView ( 193): at com.google.android.maps.MapView.drawMap > > > (MapView.java:996) > > > E/MapView ( 193): at com.google.android.maps.MapView.onDraw > > > (MapView.java:442) > > > E/MapView ( 193): at android.view.View.draw(View.java:5326) > > > E/MapView ( 193): at android.view.ViewGroup.drawChild > > > (ViewGroup.java:1420) > > > E/MapView ( 193): at android.view.ViewGroup.dispatchDraw > > > (ViewGroup.java:1192) > > > E/MapView ( 193): at android.view.ViewGroup.drawChild > > > (ViewGroup.java:1418) > > > E/MapView ( 193): at android.view.ViewGroup.dispatchDraw > > > (ViewGroup.java:1192) > > > E/MapView ( 193): at android.view.ViewGroup.drawChild > > > (ViewGroup.java:1418) > > > E/MapView ( 193): at android.view.ViewGroup.dispatchDraw > > > (ViewGroup.java:1192) > > > E/MapView ( 193): at android.view.ViewGroup.drawChild > > > (ViewGroup.java:1418) > > > E/MapView ( 193): at android.view.ViewGroup.dispatchDraw > > > (ViewGroup.java:1192) > > > E/MapView ( 193): at android.view.ViewGroup.drawChild > > > (ViewGroup.java:1418) > > > E/MapView ( 193): at android.view.ViewGroup.dispatchDraw > > > (ViewGroup.java:1192) > > > E/MapView ( 193): at android.view.View.draw(View.java:5329) > > > E/MapView ( 193): at android.widget.FrameLayout.draw > > > (FrameLayout.java:324) > > > E/MapView ( 193): at com.android.internal.policy.impl.PhoneWindow > > > $DecorView.draw(PhoneWindow.java:1701) > > > E/MapView ( 193): at android.view.ViewRoot.draw(ViewRoot.java: > > > 980) > > > E/MapView ( 193): at android.view.ViewRoot.performTraversals > > > (ViewRoot.java:829) > > > E/MapView ( 193): at android.view.ViewRoot.handleMessage > > > (ViewRoot.java:1103) > > > E/MapView ( 193): at android.os.Handler.dispatchMessage > > > (Handler.java:88) > > > E/MapView ( 193): at android.os.Looper.loop(Looper.java:123) > > > E/MapView ( 193): at android.app.ActivityThread.main > > > (ActivityThread.java:3742) > > > E/MapView ( 193): at java.lang.reflect.Method.invokeNative > > > (Native Method) > > > E/MapView ( 193): at java.lang.reflect.Method.invoke(Method.java: > > > 515) > > > E/MapView ( 193): at com.android.internal.os.ZygoteInit > > > $MethodAndArgsCaller.run(ZygoteInit.java:739) > > > E/MapView ( 193): at com.android.internal.os.ZygoteInit.main > > > (ZygoteInit.java:497) > > > E/MapView ( 193): at dalvik.system.NativeStart.main(Native > > > Method) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---