[FLASH-USERS] XFlash Bug Fixes

Seyit Hocuk seyit at astro.rug.nl
Mon Oct 20 07:37:34 EDT 2008


One more thing,

I think you might mean "file_information.pro" instead of 
"determine_file_version.pro", because only place where
"H5T_CLOSE" and "H5D_GET_TYPE" are appearing are in the files 
"file_information.pro" and "read_amr.pro".




James Guillochon wrote:
> Hi guys,
>
> Some missing code in one of the XFlash support routines was causing me 
> intermittent problems for a long time, so I figured I'd share the fix 
> in case anyone else was getting the same problem. Basically, whoever 
> wrote the routine forgot to include a couple H5_CLOSE (such as 
> "H5T_CLOSE, datatype") commands, which are necessary to avoid memory 
> leaks! The omissions I found were in the determine_file_version.pro 
> and read_amr.pro routines, both essential to XFlash. Here's the 
> location of the missing commands:
>
> determine_file_version.pro:
> Missing "H5T_CLOSE, datatype" after "H5D_GET_TYPE", should be inserted 
> after "H5D_CLOSE, dataset" line.
> "H5F_CLOSE" command appears inside if statement, it should be OUTSIDE 
> the if statement, otherwise it isn't guaranteed to execute!
>
> read_amr.pro:
> "H5F_CLOSE" command appears inside if statement, it should be OUTSIDE 
> the if statement.
>
> This was causing me a huge headache and a memory corruption issue 
> which would rear itself only occasionally, but would result in the 
> wrong file being read! Very annoying when you're looping over hundreds 
> of dumps...
>




More information about the flash-users mailing list