steinacoz / andnav

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

Some bugs I found in tile caching #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi there.

I've been looking at the code and adding a few functionalities that would only 
be useful to me... But I also found a few bugs, so I just thought I'd let you 
know about it.

- Firstly, the openFileInputBasedOnStoragePolicy  method in 
src\org\andnav2\osm\views\tiles\caching\OSMMapTileFilesystemCache.java is buggy 
(generates "unable to unlink" errors). My version is attached.

- Secondly, the deleteOldest method in 
src\org\andnav2\osm\views\tiles\caching\OSMMapTileFilesystemCache.java needs to 
be synchronized (otherwise leads to other "unable to unlink" errors, since some 
threads try to delete tiles that have already been deleted by another one)

private synchronized int deleteOldest(final int pSizeNeeded) throws 
EmptyCacheException

Good luck working on this project. Since it's almost not updated, I might make 
my own releases one day... (but I'd gladly provide the source code to anyone 
who asks for it.) Open source is good, but only if several people really work 
on the project. If you're the only one on it, it just slows you down...

Original issue reported on code.google.com by remi.ngu...@gmail.com on 22 Jul 2010 at 9:55

Attachments:

GoogleCodeExporter commented 9 years ago
I was looking at the source also, and would be interested in such a project... 
If you do create it (or if I have the time) update this issue with a comment :-)

Original comment by notzi...@gmail.com on 4 Aug 2010 at 3:33