Hi!
Accidentially I created some HDF files with lzo compressed arrays and no
FLAVOR attribute was put to these data. I did not know how this could
happen!?!
Calling ptdump to get a list of my data I got core dumps:
ptdump pos.h5
HDF5-DIAG: Error detected in HDF5 library version: 1.6.5 thread
2816043232. Back trace follows.
#000: ../../../src/H5A.c line 457 in H5Aopen_name(): attribute not found
major(18): Attribute layer
minor(05): Bad value
#001: ../../../src/H5A.c line 404 in H5A_get_index(): attribute not found
major(18): Attribute layer
minor(48): Object not found
Segmentation fault
(gdb) bt
#0 0xa7e29f83 in strlen () from /lib/tls/i686/cmov/libc.so.6
#1 0x08083efa in PyString_FromString ()
#2 0xa6a7b08e in ?? () from
/usr/lib/python2.4/site-packages/tables/hdf5Extension.so
Detailed analysis led me to the function H5ATTRget_attribute_string and
it's caller:
method _openArray of class Array
I added a test for the attribute and the things are working....
diff pytables-1.3.3/src/hdf5Extension.pyx
pytables-1.3.3_fixed/src/hdf5Extension.pyx
1354,1355c1354,1355
< if self._v_file._isPTFile:
< H5ATTRget_attribute_string(self.dataset_id, "FLAVOR", &flavor)
---
> if self._v_file._isPTFile and
H5ATTR_find_attribute(self.dataset_id, "FLAVOR")<0:
> ret=H5ATTRget_attribute_string(self.dataset_id, "FLAVOR", &flavor)
This test might be necessary at other methods, too.
Maybe it is better to handle this case in a proper way instead a core
dump. I am not sure, whether it is best to asume "numarray"...
Yours, Achim
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users