-
Hello! I think I found a bug in vtm/src/org/oscim/tiling/source/UrlTileDataSource.java probably introduced in version 0.19 😯 In the override of public void query(MapTile tile, ITileDataSink sink), the try clause now encapsulates the cache logic executed if mUseCache is true . In that logic, if the decoding of the tile succeeds, a call is made to sink.completed(QueryResult.SUCCESS) and then returns. The problem is that the outer try has a finally clause which ALSO calls the same method sink.completed(res); but the second time the completed method is called, it crashes with a null reference since the first call to completed sets an internal tile variable to NULL. If you do a blame on the file, you can see that in version 0.18, there is no try around the cache logic and therefor it works. In 0.19 it seems impossible to use BitmapTileSource with a cache using the setCache method. Using version 0.18 everything works OK. Have I missed something? 🫤 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The "TileSource.setCache" should be old code, if this is what you mean. See the samples like the BitmapTileActivity for how to use the cache with online tile sources (via OkHttp). |
Beta Was this translation helpful? Give feedback.
The "TileSource.setCache" should be old code, if this is what you mean.
See the samples like the BitmapTileActivity for how to use the cache with online tile sources (via OkHttp).