Hi,
as far as I can see this error is only produced in case of serious problems, e.g. Planar Configuration is not present in the dataset, memory is exhausted or no pixel data is present.
Probably you should check the image with a DICOM validator, e.g.
dciodvfy.
BR, Michael