LilinQ / osmdroid

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

trying to use a recycled bitmap #498

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. zoom in or out

I frequently get an exception in
MapTileProviderBase$ZoomInTileLooper.handleTile
and
MapTileProviderBase$ZoomOutTileLooper.handleTile
java.lang.RuntimeException: Canvas: trying to use a recycled bitmap 
android.graphics.Bitmap

Original issue reported on code.google.com by neilboyd on 3 Dec 2013 at 8:45

GoogleCodeExporter commented 9 years ago
I'll start by checking for isRecycled. If that doesn't work then I'll add a 
catch.

Original comment by neilboyd on 3 Dec 2013 at 9:05

GoogleCodeExporter commented 9 years ago
Done in revision 1390.

Original comment by neilboyd on 3 Dec 2013 at 9:16

GoogleCodeExporter commented 9 years ago
Maybe not related, but I have seen ConcurrentModificationException in this code:

0       java.util.ConcurrentModificationException
1   at  java.util.LinkedList$LinkIterator.next(LinkedList.java:124)
2   at  org.osmdroid.tileprovider.BitmapPool.obtainSizedBitmapFromPool(BitmapPool.j
ava:58)
3   at  org.osmdroid.tileprovider.MapTileProviderBase$ZoomInTileLooper.handleTile(M
apTileProviderBase.java:335)
4   at  org.osmdroid.tileprovider.MapTileProviderBase$ScaleTileLooper.handleTile(Ma
pTileProviderBase.java:292)
5   at  org.osmdroid.util.TileLooper.loop(TileLooper.java:34)
6   at  org.osmdroid.tileprovider.MapTileProviderBase.rescaleCache(MapTileProviderB
ase.java:248)
7   at  org.osmdroid.views.MapView.setZoomLevel(MapView.java:368)
8   at  org.osmdroid.views.MapController.setZoom(MapController.java:182)
9   at  org.osmdroid.views.MapController.onAnimationEnd(MapController.java:263)
10  at  org.osmdroid.views.MapController$MyZoomAnimationListener.onAnimationEnd(Ma
pController.java:302)

etc

Original comment by neilboyd on 13 Dec 2013 at 3:02

GoogleCodeExporter commented 9 years ago
I made a fix in revision 1394.

Original comment by neilboyd on 13 Dec 2013 at 3:10

GoogleCodeExporter commented 9 years ago
Seems to be working

Original comment by neilboyd on 4 Jan 2014 at 5:53