Hi Kai Song, [Please, try to subscribe before sending a message to the list. If not, message will bounce and other people will not be able to see them]
A Tuesday 05 January 2010 20:10:42 "Song, Kai Song" va escriure: >Hi All, > >When I use tables.openFile() to create multiple file objects on the same > file, I get seg fault if I close the close the object that is just created. > It's easier to see by the following example: > >1. The case that gives segmentation fault: >>>> import tables >>>> file1=tables.openFile('file.h5','r') >>>> file2=tables.openFile('file.h5','r') >>>> file3=tables.openFile('file.h5','r') >>>> file3.close() >>>> file1 > >Segmentation fault > >2. The case that does NOT give segmentation fault: >>>> import tables >>>> file1=tables.openFile('file.h5','r') >>>> file2=tables.openFile('file.h5','r') >>>> file3=tables.openFile('file.h5','r') >>>> file2.close() >>>> file3 > >... > >You can see if I close file2, both file1 and file3 are fine. But if I close > file3 which I just created, both file1 and file2 will get segmentation > fault. > >Is this a pytables bug, or there is something I am missing? Yes, you found a bug. You can use PyTables 2.2b2 (recently announced) where this is solved: >>> import tables >>> file1=tables.openFile('file.h5','r') >>> file2=tables.openFile('file.h5','r') >>> file3=tables.openFile('file.h5','r') >>> file3.close() >>> file1 <closed File> PyTables 2.2b2 passes all the know tests and should be fairly safe to use (it is in beta stage mainly because the new API additions for supporting links need some time before freezing definitely). Hope this helps, -- Francesc Alted ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users