Closed aherbert closed 1 year ago
Thanks @aherbert for reporting this and debugging the issue. I will do some digging into the reader history to see why the exception is only ever being logged, really an IOException like that should really be thrown. Hopefully this should be something we can quickly resolve in an upcoming release.
The MicromanagerReader can swallow an IOException and infinite loop. The offending method is:
I have a TIFF file that has an incorrect IFD (due to file truncation). When the code executes
int nIFDs = parser.getMainIFDs().size()
the methodgetMainIFDs
throws an EOFException. This is caught within the loop and logged. But the loop iteration counterplane
is not incremented. Thus the loop just repeats. Reproduce with:Debug output is:
If I remove the sidecar metadata.txt file written by MicroManager then Bioformats selects the
TiffReader
. This trickles up the EOFException and the user is notified that there is an error with the image.This bug was identified during an import into OMERO which just hangs due to the infinite loop.
Image to reproduce the error is attached:
mrc5 60_17_MMStack_Pos0.zip
A simple fix is to increment
plane
in the catch block. But it is not clear why it is acceptable to swallow an IOException for this format inside the loop. The call toprivate void parsePosition(String jsonData, int posIndex)
outside the loop is allowed to throw an IOException.