Hey all:

Trying to take a dataset of float values and build an array that can be used to generate a raster. If i have code something like this:

*// Open up the dataset.
H5DataSetId curDepthDataset = H5D.open(curHDF, curName1 + "/" + **curName2 **+ "/" + **curName3 **+ "/depth"); H5ObjectWithAttributes curDepthAttObj = (H5ObjectWithAttributes)curDepthDataset;

// Create a Byte[] to hold the depth data.
H5DataTypeId datasetType = H5D.getType(curDepthDataset);
H5T.H5TClass datasetClass = H5T.getClass(datasetType);
H5DataTypeId datasetNativeType = H5T.getNativeType(datasetType, H5T.Direction.ASCEND);

int bufferSize = H5T.getSize(datasetNativeType);

System.Array buffer = System.Array.CreateInstance(Type.GetType("System.Byte"), bufferSize);
Byte[] bArray = HdfHelper.ConvertToBytes(buffer);

H5D.read(curDepthDataset, datasetNativeType, new H5Array<byte>(bArray));*

Why would this give me an error like this:

*FatalExecutionEngineError was detected*

*The runtime has encountered a fatal error. The address of the error was at 0x6b344243, on thread 0x334. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.

*I am having no trouble using this method to read the attributes out of the individual groups.

Thanks,
DB

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

Reply via email to