Open cqian89 opened 1 week ago
Thanks, @cqian89. This change makes sense to me, so it will be included in tonight's CI builds to see if any of our existing SDT test files are affected.
Before merging this pull request, we will need to have a signed Contributor License Agreement. Please submit the CLA according to the instructions here: https://ome-contributing.readthedocs.io/en/latest/cla.html
Thank you. I just submitted the signed CLA as per the instructions.
I encountered a java.lang.NegativeArraySizeException when reading files recorded by the latest version (9.90) of Becker Hickl's SPCM64 software. Files recorded with older versions don't seem to have this issue.
On further investigation, it seems to be related to a value setupLength. This should be an unsigned short, but was read as a signed short previously. In the SDT files recorded by the latest SPCM64, this seems to have exceeded the range of a signed short but is still within range of an unsigned short.
This PR fixes the error by changing readShort to readUnsignedShort and the type of setupLength to int.
Test data here: https://doi.org/10.5281/zenodo.12094862