Bug #990
closedmissing image file causes getimg.php to hang
100%
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.
Updated by Anchi Cheng about 14 years ago
- 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
Updated by Eric Hou about 14 years ago
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
Updated by Eric Hou about 14 years ago
- Target version set to Appion/Leginon 2.2.0
Updated by Anchi Cheng about 14 years ago
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.
Updated by Anchi Cheng almost 14 years ago
- Status changed from Assigned to In Code Review
Updated by Eric Hou almost 14 years ago
- 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