Bug #990
closed
  
    
    
  
missing image file causes getimg.php to hang
 
        
        Added by Anchi Cheng about 15 years ago.
        Updated almost 15 years ago.
        
Affected Version:
Appion/Leginon 2.0.2
 
 
  
  
  
  Description
  
  getimg.php add a few tags with gd to the image it gets from inc/image.inc getImage().  r14624 that made getImage to return false rather than blank image when file not exists makes getimg.php hang in these operations.
	Example,
	session 10may11anchitestA7b
image 10may11anchitestA7b_00001gr.mrc
	The image file /ami/data15/leginon/10may11anchitestA7b/rawdata/10may11anchitestA7b_00001gr.mrc does not exist.
	Note: This works fine on cronus3/myamiweb and amber's sandbox. There is a cached jpeg image for file.
It seems Just my sandbox with cache not enable have this problem.
   
 
 
  
  
    
    
    
    
       - Assignee changed from Anchi Cheng to Eric Hou
 
       - % Done changed from 0 to 100
 
    
    Not quite sure why it only happens on my sandbox but the early return fixes it and it makes no sense to add tag to boolean false any way. r14979
	We may need to figure out when getimg.php should output blank image and when it should output nothing
 
     
   
  
  
    
    
    
    The reason I return false when image is missing in the file system instead of create a blank image file is because if we create a blank image, this blank image will get cache in the file system. Then when we restore the original image back to the file server, viewer will still just looking for the caching file which is a blank image.
The purpose of this is to not caching the file if file is missing.
We might need a better logic in the viewer to display missing image message instead of doing nothing (which is what happen now)
	Thanks.
	Eric
 
     
   
  
  
    
    
    
    
       - Target version set to Appion/Leginon 2.2.0
 
    
    
     
   
  
  
    
    
    
    r14979 calls getImage directly from inc/image.inc so my change in getimg.php should not affect the caching.
	r14980 display blankimg in this case so that loi raster layout does not look uneven.  This is still debatable.
 
     
   
  
  
    
    
    
    
       - Deliverable set to 2.2 Bug Reduction
 
    
    
     
   
  
  
    
    
    
    
       - Status changed from Assigned to In Code Review
 
    
    
     
   
  
  
    
    
    
    
       - Status changed from In Code Review to In Test
 
    
    code looks good. It is good to crate an blank image when there is no image. Good thinking.
	Eric
 
     
   
  
  
    
    
    
    
       - Status changed from In Test to Closed
 
    
    
     
   
  
 
  
  
 
Also available in:  Atom
  PDF