Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7709605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:54:14+00:00 2026-06-01T00:54:14+00:00

I have big issues in tracing down ‘bitmap size exceeds VM budget’ error. I

  • 0

I have big issues in tracing down ‘bitmap size exceeds VM budget’ error. I looked at other questions, and tried all sugesstions (deallocating resources, using bitmap.recycle() and setting variables, bitmaps, canvases to null when activity is destroyed or views are detached from window https://stackoverflow.com/a/6779448/571143, also tried to get rid of ‘this’ context and used this.getAplicationContext()).

The problem I’m expieriencing is not with a bitmap being too big to load. Everything loads ok at first, but after many repeated changes of current activity I get this error (on device it happens after much more activity changes than on emulator).

So, back to my question, is there a way to use the allocation tracker or heap analyzer to guide me in the right direction? There is no trace of “bitmap allocation” in those tools, only small (mostly less then 1kb) allocations. I’ve already read this: http://android-developers.blogspot.com/2009/02/track-memory-allocations.html

I know that I’m doing something wrong, because the bitmaps don’t deallocate, but the project I’m working on is pretty big, made by a bunch of people, so analyzing everything by hand would be last resort and also extremely time consuming.

I’d appreciate any hints regarding those tools in such scenario.

cheers,
kajman

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T00:54:16+00:00Added an answer on June 1, 2026 at 12:54 am

    As you’ve figured out its some sort of memory leak. If you haven’t already, make sure you aren’t just accumulating bitmaps in a cache without ever clearing it. Other likely (and more subtle) issues include having a long running task(s) that have references to activities or contexts, or activities registering listeners with long running tasks or singletons.

    You can use the Eclipse Memory Analyzer http://www.eclipse.org/mat/ tool to track down which types of references are being held. Its a little tricky on 2.x phones because bitmaps are allocated in native memory and won’t show up in your VM heap dump. You will still see the bitmaps, but they won’t be listed at the size they actually take up. You can get around this by trying to compare the # of bitmap objects when you first open the app vs after starting lots of new activities.

    For an excellent talk on debugging these issues and using the relavent tools, see the google IO talk: http://www.youtube.com/watch?feature=player_embedded&v=_CruQY55HOk

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have big element at the top of the webpage that sides down with
I have big problems with css buttons... My screen size is 1366x768 and their
I have some bad performance issues in my application. One of the big operations
Does System.Activator.CreateInstance(T) method have performance issues (since I'm suspecting it uses reflection) big enough
I have a big jar file that has a lot of dependencies on other
I have big system that make my system crash hard. When I boot up,
I have big URL list, which I have to download in parallel and check
I have big trouble with file uploads with php. My own tests are successful
I have big problem when I am trying to deploy my app over clickonce.
I have big set of urls and I want to implement an autocompletion. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.