mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-05 17:40:40 +02:00
bug fixes related to file saving (#931)
* fix the file path resetting issue of GUI in the case where different modules have different fpath setting. * fix stack-buffer-overflow issue when using HDF5 HDF5DataFile::parameterDataTypes have 64bit type (i.e. STD_U64LE), the size of fill_value should be at least 8 bytes. * change the type of fill_value to uint64_t
This commit is contained in:
parent
043a5f3cc1
commit
856b5e8aab
@ -839,8 +839,8 @@ void qTabMeasurement::UpdateProgress() {
|
|||||||
int qTabMeasurement::VerifyOutputDirectoryError() {
|
int qTabMeasurement::VerifyOutputDirectoryError() {
|
||||||
try {
|
try {
|
||||||
auto retval = det->getFilePath();
|
auto retval = det->getFilePath();
|
||||||
for (auto &it : retval) {
|
for (size_t i = 0; i < retval.size(); i++) {
|
||||||
det->setFilePath(it);
|
det->setFilePath(retval[i], {i});
|
||||||
}
|
}
|
||||||
return slsDetectorDefs::OK;
|
return slsDetectorDefs::OK;
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ void HDF5DataFile::CreateFile() {
|
|||||||
// property list
|
// property list
|
||||||
H5::DSetCreatPropList plist;
|
H5::DSetCreatPropList plist;
|
||||||
H5::DSetCreatPropList plistPara;
|
H5::DSetCreatPropList plistPara;
|
||||||
int fill_value = -1;
|
uint64_t fill_value = -1;
|
||||||
plist.setFillValue(dataType, &fill_value);
|
plist.setFillValue(dataType, &fill_value);
|
||||||
// plistPara.setFillValue(dataType, &fill_value);
|
// plistPara.setFillValue(dataType, &fill_value);
|
||||||
plist.setChunk(DATA_RANK, dimsChunk);
|
plist.setChunk(DATA_RANK, dimsChunk);
|
||||||
|
@ -215,7 +215,7 @@ std::string CreateVirtualHDF5File(
|
|||||||
|
|
||||||
// property list
|
// property list
|
||||||
H5::DSetCreatPropList plist;
|
H5::DSetCreatPropList plist;
|
||||||
int fill_value = -1;
|
uint64_t fill_value = -1;
|
||||||
plist.setFillValue(dataType, &fill_value);
|
plist.setFillValue(dataType, &fill_value);
|
||||||
std::vector<H5::DSetCreatPropList> plistPara(paraSize);
|
std::vector<H5::DSetCreatPropList> plistPara(paraSize);
|
||||||
// ignoring last fill (string)
|
// ignoring last fill (string)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user