petabytekr / worldwindrcp

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

Occasional missing tiles #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,
Maybe this is a bug with the way I'm using the layer but... sometimes new
tiles are not loaded correctly. I've noticed it the most when doing a
'flyTo', i.e. lots of new tiles in different layers

WorldWind Java 0.5.0, slightly modified VirtualEarth layer to work with
this version

What steps will reproduce the problem?
1. Move around a whole lot
2. Wait for some gaps to appear :)

The gaps do not seem to be filled in 'ever'. After some debugging it looks
like the problem is with the 'download' in QuadKeyEarthTile

1. download() called
2. loading -> true
3. WorldWind.getTaskService().addTask(new Runnable() { ... should be
called.. but it does not always make it to the run(), and a snoop shows no
GET requests for the URL -> missing tile
5. Move around, gaps stay

ThreadedTaskService has a default queue size of 10, quite a few times the
test WorldWind.getTaskService().isFull() returns true, so I assume the task
is just not added if the queue is full.. and the download is then not
retried because we have loading = true -> return

So far this seems to be fixed by adding the test:

if (! WorldWind.getTaskService().isFull()) {
 loading = true;

 WorldWind.getTaskService().addTask(new Runnable() {
 .....
}

..-> download is called (with each draw?) until the queue is not full and
it can continue.. but maybe there is a better way?

Cheers,
Mike

Original issue reported on code.google.com by mike.gee...@gmail.com on 31 Aug 2008 at 4:17