【发布时间】:2014-10-21 16:24:32
【问题描述】:
我正在使用 Google Maps v2 并收到以下错误:
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)
应用程序尚未崩溃,但地图不再显示。当我再次加载包含地图的活动时,应用程序会显示警告并崩溃并显示以下错误消息:
警告:
<sharedmem_gpumem_alloc_id:1431>: sharedmem_gpumem_alloc:
mmap failed errno 12 Out of memory
错误:
<ioctl_kgsl_sharedmem_alloc:1532>:
ioctl_kgsl_sharedmem_alloc: FATAL ERROR : (null)
我认为问题可能是自定义图标的使用:
googleMap.addMarker(new MarkerOptions()
.position(chargingStationObject.geoData)
.title(chargingStationObject.name)
.snippet(chargingStationObject.stationAvailability)
.data((chargingStationObject.id))
.icon(iconDescriptor_gray));
有没有办法防止这种情况发生?例如,对图标使用较小的位图?
【问题讨论】:
标签: android google-maps out-of-memory fatal-error