deimos1988
deimos1988

Reputation: 6086

Fatal error in google maps

I am using mapview with GoogleMaps, and when I zoom long enough on the map, the activity crashes with the code:

<ioctl_kgsl_sharedmem_alloc:1532>: 
   ioctl_kgsl_sharedmem_alloc: FATAL ERROR : (null)

First question: Is this a bug in my code, or is it some other bug I am not responsible for? Second question: How can I prevent this, or at least preventing the crash of the activity?

I am also getting this error (the app doesn't crash in this case though, but the map is not shown anymore):

E/qdmemalloc(17414): ion: Failed to map memory in the client: Out of memory
E/qdgralloc(17414): Could not mmap handle 0x7e55bf40, fd=143 (Out of memory)
E/qdgralloc(17414): gralloc_register_buffer: gralloc_map failed
E/GraphicBuffer(17414): unflatten: registerBuffer failed: Out of memory (-12)

EDIT: Please also see this question:

Google Maps - Out of memory exception

Upvotes: 1

Views: 1571

Answers (1)

Lal
Lal

Reputation: 14810

See this link..

It says

Near as I can tell from some basic MAT sleuthing, what you are seeing is a cache 
maintained by Maps V2 of downloaded map data. The cache seems to be bigger if you pan
and zoom a lot. The cache shrinks if you leave the map and return to a fresh map later
on. I could not get N caches from N times launching the map activity of your sample
app, and the cache size ebbed and flowed depending upon what the user did.

Alas, this cache is unconfigurable, AFAIK, in terms of how big it is, when it gets
cleared out, does it spill over to disk, etc.

So, by default, all you can do is leave aside a healthy chunk of your heap space for 
Maps V2 to play with, and take steps to stay within this smaller subset of heap.

If you wanted to experiment, you could try calling clear() on GoogleMap, or
onLowMemory() on your SupportMapFragment, to see if any help reduce this cache size.

Please Refer this link too..

Upvotes: 3

Related Questions