POST
|
Are you saying that an app that worked as expected prior to 10.2 and after updating the app to 10.2 the issue started? Has the source code for the app not changed only updating to 10.2 libraries? Can you share any source to reproduce this issue? Our application looks very similar to an example that tmsbn90 desribed. We've got main activity from which an app user can open new Activity containing MapView. I add three layers to the mapView, OpenStreetMapLayer as the background, ArcGISLocalTiledLayer in the front and Graphic layer for showing graphic markers. When we were using SDK v. 10.1 after entering the activity containing the map it was clearly visible that the application was using much more memory than in the beggining. We conducted tested which clearly shhowed that there are memory leakage problems. Single app used not more than 45-50 MB for RAM, after entering the map activity 10 times app used about 100 MB, it was clearly visible than every time the user entered the activity about 5 MB leaked. That is why we decided to upgrade the SDK to 10.2 version. The problem with memory leakage disappeared, now the map activity is closed propearly, but from time to time while closing this activity the app crashes. I tried various ideas to avoid this, what helped a bit was adding this piece of code before leaving the activity: if (mMapView != null) {
if (!mMapView.isRecycled()) {
Layer[] ll = mMapView.getLayers();
if (ll.length > 0) {
for (Layer layer : ll) {
mMapView.removeLayer(layer);
layer.recycle();
}
}
}
mMapView = null;
} It removes all layers just before the app would do it. It helped a bit still the problem exists.
... View more
02-04-2014
02:41 AM
|
0
|
0
|
1094
|
POST
|
After updating the SDK to version 10.2 we encounter a new problem which causes the app to freeze. The problem appears from time to time when the user the leaves the Activity which has a MapView in its layout. When I managed to investigate is that the problem is caused when the MapView object is removed from memory. Normally removing of MapView should look like this (logs from LogCat):
D/ArcGIS.LifeCycle(10955): MapSurface.destroyContext <start>:GLThread 554
D/ArcGIS.LifeCycle(10955): MapSurface.destroyContext <- release WebMapTask>:GLThread 554
D/ArcGIS.LifeCycle(10955): MapSurface.destroyContext <- shutdown threadpool>
D/ArcGIS.LifeCycle(10955): MapSurface.destroyContext <- pause (release)>
D/ArcGIS.LifeCycle(10955): MapSurface released
D/ArcGIS.LifeCycle(10955): MapSurface.destroyContext <- recycle layers>
D/ArcGIS.LifeCycle(10955): MapSurface.destroyContext <- release map>
D/ArcGIS.LifeCycle(10955): < MapSurface.Context recycled. com.esri.android.map.MapSurface{418e66b0 V.E..... ........ 0,0-640,671}
D/ArcGIS.LifeCycle(10955): MapSurface.destroyContext <- release done!>
D/ArcGIS.LifeCycle(10955): MapSurface.destroyContext <done> But from time to time it suddenly stops during this process, then the log look like that:
D/ArcGIS.LifeCycle(10955): MapSurface.destroyContext <start>:GLThread 554
D/ArcGIS.LifeCycle(10955): MapSurface.destroyContext <- release WebMapTask>:GLThread 554
D/ArcGIS.LifeCycle(10955): MapSurface.destroyContext <- shutdown threadpool>
D/ArcGIS.LifeCycle(10955): MapSurface.destroyContext <- pause (release)>
D/ArcGIS.LifeCycle(10955): MapSurface released Next no further log is printed until the app notifies about the crash. Has anyone encountered the same problem or found any solution to it ?
... View more
01-23-2014
12:06 AM
|
0
|
9
|
3091
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|