| 
			
			 | 
		#46 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I'll certainly try it if I see it again. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	After logging many hours over the weekend trying to get it to happen (with ProcessMonitor logging), I was utterly unsuccessful. After the three times, in quick succession, I saw it on Friday... nothing. Nada. It's maddening. I've come to the conclusion that having ProcessMonitor running is somehow actually preventing the race condition from ever happening. I have no other explanation. I can probably easily confirm that by hitting it hard again without ProcessMonitor running. But I'm afraid that if it happened as soon as I turned off the filesystem i/o logger, I might gouge my own eyes out! That would mean the only way I can replicate it would be to ensure that I can't debug it. ARGH!!! I'm not sure I want to find that out!  
		 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#47 | 
| 
			
			
			
			 A Hairy Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,397 
				Karma: 20212733 
				Join Date: Dec 2012 
				Location: Charleston, SC today 
				
				
				Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Please don't go too crazy over this!!  I only mentioned it because it was an interesting find...not because it was essential.  If it was something that essential you would hear me knocking on your door instead of just reading a post... lol  
		
	
		
		
		
		
		
		
		
		
		
		
	
	 
		 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#48 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			This should be easy to fix by simply using atomic writes for the config file. i.e. have the code that writes the config file write to temp file and rename the temp file to the original after the write is complete.  
		
	
		
		
		
		
		
		
		
		
		
		
		
			The file system watcher should notify you about the rename and you are guaranteed that when the rename arrives, the file contents are updated. Last edited by kovidgoyal; 09-27-2017 at 02:39 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#49 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			And of course to make it fully robust you have to make sure that the code that renames and the code that reads from the file retries on locking failures for a few seconds.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#50 | |
| 
			
			
			
			 Unicycle Daredevil 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,944 
				Karma: 185432100 
				Join Date: Jan 2011 
				Location: Planet of the Pudding Brains 
				
				
				Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#51 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#52 | 
| 
			
			
			
			 mostly an observer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,519 
				Karma: 996810 
				Join Date: Dec 2012 
				
				
				
				Device: Kindle 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			When I open a new instance of Sigil, the first thing to appear is the Clip window (I've shrunk it to postage-stamp size so it doesn't impinge on the other windows.) It's rather eerie to see it hanging there like the smile on the face of the Cheshire Cat, in reverse, before his body pops into place. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	But I have only seven clips.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Re: Clips | JimmyG | Sigil | 2 | 02-13-2013 10:16 AM | 
| Clips | JimmyG | Sigil | 2 | 11-16-2012 01:21 PM | 
| Touch Two clips enough? | Red Alert | Barnes & Noble NOOK | 9 | 07-08-2011 06:23 PM | 
| PRS-505 Are those cover clips available anywhere? | Worldwalker | Sony Reader | 1 | 04-07-2010 09:35 AM | 
| 1K clips with Handstory | Noodles Hovar | Reading and Management | 1 | 04-02-2003 10:31 PM |