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 ?