amal-kronz-orch / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

OutOfMemory Loading Tiles #292

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I got a problem with the OSMDROID Library, When I am going to close the 
activity and reopen it for 4 times, the 4th times the application crashed

Logs:

01-05 21:03:20.185: D/dalvikvm(22521): GC_EXTERNAL_ALLOC freed 496K, 59% free 
7467K/17927K, external 29243K/31035K, paused 91ms
01-05 21:03:20.205: E/dalvikvm-heap(22521): 2097152-byte external allocation 
too large for this process.
01-05 21:03:20.245: E/GraphicsJNI(22521): VM won't let us allocate 2097152 bytes
01-05 21:03:20.245: D/dalvikvm(22521): GC_FOR_MALLOC freed 0K, 59% free 
7467K/17927K, external 29243K/31035K, paused 29ms
01-05 21:03:20.245: D/skia(22521): --- decoder->decode returned false
01-05 21:03:20.245: D/AndroidRuntime(22521): Shutting down VM

The reason that I am going to open and close the activity is because the 
application is a game, I am going to tap on the map and then when the game is 
finished I go back to the map.

The loading of the tiles after the 4th times gave me the error. I tried to 
change the CACHE size from 9 to 20 and the thread from 2 to 8 but nothing is 
changed.

I am looking how to clear the cache and dis-allocate the memory.

Original issue reported on code.google.com by max...@gmail.com on 5 Jan 2012 at 9:11

GoogleCodeExporter commented 9 years ago
Increasing those numbers will increase the memory requirements so only make it 
worse.

Original comment by neilboyd on 6 Jan 2012 at 6:04