Hi all.  I'm collecting signals from some electronics instrumentation and
trying to store them in an HDF5 file.  Without knowing how long my
collection is going to go in advance, it seems like my best option is to
expand the dataset as I need.  But it seems like doing this with a compound
data type of more than about 10 doubles leads to a crash.  The crash looks
like this:

C:\Users\awaltman\Documents\Visual Studio
2010\Projects\ConsoleApplication3\Cons
oleApplication3\bin\Debug>ConsoleApplication3.exe

Unhandled Exception: System.AccessViolationException: Attempted to read or
write  protected memory. This is often an indication that other memory is
corrupt.
   at H5Dwrite(Int32 dataSetId, Int32 memType, Int32 memSpace, Int32
fileSpace,
Int32 xfer, Void* data)
   at HDF5DotNet.H5D.write[Type](H5DataSetId dataSetId, H5DataTypeId
memTypeId, H5DataSpaceId memSpaceId, H5DataSpaceId fileSpaceId,
H5PropertyListId xferPropLi stId, H5Array`1 data)
   at HDF5DotNet.H5D.write[Type](H5DataSetId dataSetId, H5DataTypeId
memTypeId,
H5Array`1 data)
   at ConsoleApplication3.Program.Main(String[] args) in
C:\Users\awaltman\docum ents\visual studio
2010\Projects\ConsoleApplication3\ConsoleApplication3\Program
.cs:line 62

Source to reproduce the problem:

http://hdf-forum.184993.n3.nabble.com/file/n3302724/Program.cs Program.cs 

The attached version tries to write 15000 columns, expanding the data set
one at a time for each write, with 32 rows (double values) in each.  If you
drop it down to rows = 8, it runs successfully and I can check out the
results in an HDF viewer.

If there's another way I should be doing this, like tables, let me know. 
This seems to be what I have available through the HDF5DotNet API though.

Thanks,

Aaron Altman

--
View this message in context: 
http://hdf-forum.184993.n3.nabble.com/HDF5DotNet-memory-leak-when-expanding-with-HD5-setExtent-tp3302724p3302724.html
Sent from the hdf-forum mailing list archive at Nabble.com.

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to