ThinkGeo.com    |     Documentation    |     Premium Support

Error: directory is not empty

I think this is related to caching, but sometimes when a map.refresh is called in our app, the error message "The directory is not empty" comes up and kills everything.


I have a google overlay and a few other overlays each using their own FileBitmapTileCache.  The google overlay doesn't have a call to clear cache when it is defined, but the other overlays do.


Any ideas on how I can resolve this error? This doesn't happen every time, just occasionally, but certainly enough to make the app look bad.


Thanks!


Kimberly



Kimberly,


I agree this is definitely a very bad thing for its happening occasionally. Just a couple of things to make sure:


1) Which version are you using now? It is the last public version or some temporary version later sent to you?
 
2) How many overlays used which were set the FileBitmapTileCache? Can you check that all the different overlays have been set the different directory folders for them? Is there any 2 ore more overlays set the same directory?
 
3) How may overlays has been called the ClearCache? And has the API  DeleteTile and DeleteTiles ever been called?
 
4) I think you are using the French 32bit environment, while I think the Tile Cache has fixed the environmental problem.
 
If you want, I can make a small simple application tested very well in our side and send to you to see it can works well or not.
 
If you have any more questions just feel free to let me know.
 
Thanks.
 
Yale

FWIW… I have experienced this as well…  It is inconsistent.   And we are not using multi-threaded.    We have a silent try/catch around the place where this was happening, so I do not know if it is still happening frequently or not.    I know I’m not providing any info that helps… but did want you to know that something appears to keep some of those tiles held open, preventing the directory from being erased.

Ted, 
  
 Thanks for your sharing experience, I know that this problem may happen in some versions some time ago, while it was not expected and I did not see it in Single threaded mode any more, if you happen to get it, just feel free to let us know, we will do more tests on it. 
  
 Thanks. 
  
 Yale 


Answers to the questions: 
  
 1. “3.1.299” 
 2. The app currently has 5 overlays using the FileBitmapTileCache. Each of them is set to a different directory for the caching.  
 3. The google overlay doesn’t have a call to clear cache, but the 4 others do. The call to clear cache is when the overlay is defined on load, but never again while the app is running. DeleteTile and DeleteTiles are never called. 
 4. I’m not using a French version. While I wish I could speak French, I can not. I am using a 32 bit version. 
  
 Ted, thanks for your input! I guess I’ll have to go that route, though it’s a little discouraging, huh? :(  
  
 Yale, in response to your comment on threading, I am using the multithreaded mode. The map is fairly slow as it is and I hate to think what going back to single threaded mode would do to the speed.

Kimberly, 
  
 I just worked on the performance (panning) a few days ago, it did was very slow when panning when you set the background and adornment overlay, that was because of a hidden bug in Map Suite component. Now, the panning performance has been enhanced quite a bit (at least only take half time now). 
  
 About the exception mentioned in this topic, could you try not to call the ClearCache even when the overlay is defined on load, to see this exception will still be happening? 
  
 Any more questions just feel free to let me know. 
  
 Thanks. 
  
 Yale 


Yale, 
  
 I just migrate to 3.1.375 and I now get the same error message. 
 I do not user ClearCache. 
  
 Please advise. 
 Patrick.

I submitted a support ticket on this over 24 hours ago on this and have not recieved any response even on my support ticket. Is there a developer that can walk through the ThinkGeo code and figure out where this issue might be caused and if there is anything that can be done to resolve this?  
  
 Kimberly

Kimberly, 
  
 Could you let me know the ticket number? I did not see it yet. About this problem, it should related with TileCache, we have go though the TileCache logic, it seems it should not happen any more if you do not delete the Tiles on the fly.  
  
 It would be very helpful if you can show us a small sample application, this way, we can recreate it in our enviroment and fix it. 
  
 Thanks. 
  
 Yale