Black squares / tiles in cached maps

Started by pikimin_tom, February 27, 2018, 12:19:02 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

pikimin_tom

I have a problem when viewing cached raster maps. When I view an area, all tiles of a map load and display correctly. If I scroll away then scroll back into an area, sometimes some of the tiles are displayed as black (or in 1 instance green, but mostly black). The screenshot below demonstrates what this looks like (the this is so far the only instance of a green square)



http://martianmonkey.co.uk/images/Screenshot_20180226-225533.jpg">



Note that originally the tiles load and display correctly, so the problem is not with the download or the data received, it appears to be a problem with the way the tiles are stored in the database. Once a tile is shown as black, it remains black on all subsequent views until I refresh tiles. Sometimes a tile is only partially black, i.e. there will be a flat/short black rectangle.



This is using the latest version, 7.2.7, and using a Samsung Galaxy A5. The problem appears to not be present on my old Samsung Galaxy S3, however.

pikimin_tom

#1
Somehow the formatting of the original post became messed up so here is the hopefully correct link to the image showing the black squares:



http://martianmonkey.co.uk/images/Screenshot_20180226-225533.jpg">

orux

#2
Quote from: pikimin_tom post_id=13010 time=1520591729 user_id=7329
Somehow the formatting of the original post became messed up so here is the hopefully correct link to the image showing the black squares:




If I understand right, the tiles are OK the first time, but when you pan the map and come back to the same point, you see wrong tiles, right?



Remove the file oruxmaps/mapfiles/OruxMapsCacheImages.db file.



Maybe the cache database is corrupted,



orux

pikimin_tom

#3
Yes your understanding is correct: initially everything loads correctly, and only when panning back to a region do the black tiles appear. Once a tile becomes black, the same tile is always black until I do a refresh.


Quote from: orux post_id=13017 time=1520690754 user_id=2
Remove the file oruxmaps/mapfiles/OruxMapsCacheImages.db file.



Maybe the cache database is corrupted,


I've tried that, but almost immediately afterwards another black tile appeared. The following link is to the new OruxMapsCacheImages.db file so you can investigate what the problem might be.



http://martianmonkey.co.uk/images/OruxMapsCacheImages.db">//http://martianmonkey.co.uk/images/OruxMapsCacheImages.db



I have however looked into the file using sqlite and dumped all of the images into files to investigate. The black tile shown in the image below is at co-ordinate x=1992, y=1255 and z=12. The resulting PNG file appears to be truncated at 4096 bytes, and if I view it in an image viewer I can see just the top portion of the tile. I identified a second similar tile at co-ordinates x=1992, y=1238 and z=12, also truncated at exactly 4096 bytes. I also tried dumping tiles from my actual OruxMapsCacheImages.db file and found a number of tiles truncated at 4096 bytes. So the issue appears to be that the tiles are downloaded correctly, but for some reason only the first 4096 bytes are saved to the database file.



I hope this helps you find the problem.



http://martianmonkey.co.uk/images/Screenshot_20180312-201808.jpg">

pikimin_tom

#4
Hello,



I'm wondering if you've had chance to take a look at this bug? I've just installed the latest version, 7.2.14, but the problem is still there  :(

mahmuzo

Hi!
I have the same problem with OruxMaps v.7.4.22. Will there be any solution?

orux

Quote from: mahmuzo on December 08, 2019, 03:39:42 PM
Hi!
I have the same problem with OruxMaps v.7.4.22. Will there be any solution?
The problem is that the app receives a correct bitmap.
You can refresh the tileset, Map button-->map tweaks, refresh tiles.
it should solve the problem if the server provides a good tile.


orux

mahmuzo