Closed GoogleCodeExporter closed 9 years ago
I've also seen this occasionally. I'm not exactly sure of the reason, but
presumably a threading/synchronisation issue. We should at least catch it,
even if we can't fix it.
Original comment by neilboyd
on 17 Aug 2010 at 7:41
Catch the error in revision 317.
Original comment by neilboyd
on 18 Aug 2010 at 7:12
I've seen something similar too. Mine was "mPending.put(aTile, PRESENT);" in
OpenStreetMapAsyncTileProvider.java (line 49 in my src) crashing in HashMap.put
(LinkedHashMap.java:381).
Original comment by invisibl...@gmail.com
on 18 Aug 2010 at 10:26
I've caught that one as well in revision 318.
Original comment by neilboyd
on 19 Aug 2010 at 7:25
Received another one, mPending.clear() in clearQueue():
java.lang.NullPointerExceptionjava.lang.NullPointerException
at java.util.LinkedHashMap.clear(LinkedHashMap.java:327)
at
org.andnav.osm.tileprovider.OpenStreetMapAsyncTileProvider.clearQueue(OpenSt
reetMapAsyncTileProvider.java:66)
at
org.andnav.osm.tileprovider.OpenStreetMapAsyncTileProvider.access$3(OpenStre
etMapAsyncTileProvider.java:65)
at
org.andnav.osm.tileprovider.OpenStreetMapAsyncTileProvider$TileLoader.run(Op
enStreetMapAsyncTileProvider.java:168)
at java.lang.Thread.run(Thread.java:1096)
Original comment by bob.hage...@gmail.com
on 26 Aug 2010 at 2:21
I also received one here:
java.lang.NullPointerException
at java.util.LinkedHashMap.makeTail(LinkedHashMap.java:271)
at java.util.LinkedHashMap.get(LinkedHashMap.java:257)
at
org.andnav.osm.views.util.OpenStreetMapTileCache.getMapTile(OpenStreetMapTileCac
he.java:49)
at
org.andnav.osm.views.util.OpenStreetMapTileProviderDirect.getMapTile(OpenStreetM
apTileProviderDirect.java:35)
at
org.andnav.osm.views.overlay.OpenStreetMapTilesOverlay.onDraw(OpenStreetMapTiles
Overlay.java:123)
at
org.andnav.osm.views.overlay.OpenStreetMapViewOverlay.onManagedDraw(OpenStreetMa
pViewOverlay.java:60)
at org.andnav.osm.views.OpenStreetMapView.onDraw(OpenStreetMapView.java:694)
...etc
Original comment by neilboyd
on 27 Aug 2010 at 8:10
Taking a stab at making the map use threadsafe in
OpenStreetMapAsyncTileProvider and OpenStreetMapTileCache.
Original comment by bob.hage...@gmail.com
on 28 Aug 2010 at 1:40
Attachments:
We've had the discussion about synchronization vs performance many times, but
the NPE's show that it's still not right. So let's try this fix and see if it's
better - it looks simple enough to be good ;-)
We should probably remove the catches I added otherwise no-one will notice if
we're still getting those errors.
Committed in revision 323.
Original comment by neilboyd
on 30 Aug 2010 at 9:07
I removed the catch NPE in revision 325.
Original comment by neilboyd
on 2 Sep 2010 at 6:49
I haven't seen any NPE's since I made this change, and I didn't notice any
performance degradation, so I think I'll close this now.
Original comment by neilboyd
on 10 Sep 2010 at 2:31
Original issue reported on code.google.com by
bob.hage...@gmail.com
on 16 Aug 2010 at 7:06