dicomParser
dicomParser copied to clipboard
Images from Siemens Avanto and Skyra caused buffer overrun
Hello. If I try to view images from Siemens Avanto and Skyra cornerstone give error. dicomParser:parseDicomDataSetExplicit: buffer overrun
I am getting a lot of that as well, what parsing method are you using. I get a similiar issue with dicomParser.explicitDataSetToJS but not with dicomParser.parseDicom
I just ran into something similar today. I'm not sure if it's related to a certain set of images. What's really weird is that it worked on one computer but did not work on another.
Just in case computer specs are necessary: core i3-4130, 4gb RAM, windows 7 pro sp1, optiplex 3020. That's the computer for which it didn't work.
I've got the same error with images from a Phillips Multiva MR.
You can download it from here: http://45.63.8.72/downloads/mr_phillips_multiva.dcm
Please forget about that, it turns out I've got that image from Conquest using WADO and forcing TransferSyntax to 1.2.840.10008.1.2.4.70, so it must be a Conquest bug while converting to JpegLossless.
Usually buffer overruns have to do with misinterpreting the DICOM (most likely because the DICOM is corrupt or non compliant in some way). Does anybody have any sample DICOM that can reproduce this bug? @jkrot @xpackal5 Otherwise we might as well close this.
From what I can remember it was due to some tags just being completely missing not empty that the parser was expecting or chosing the end tag for parsing and it was missing.
I don't have those files anymore but I had to do a ton of defense coding around these files.
On Fri, May 4, 2018, 11:02 PM yagni [email protected] wrote:
Usually buffer overruns have to do with misinterpreting the DICOM (most likely because the DICOM is corrupt or non compliant in some way). Does anybody have any sample DICOM that can reproduce this bug? @jkrot https://github.com/jkrot @xpackal5 https://github.com/xpackal5 Otherwise we might as well close this.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cornerstonejs/dicomParser/issues/62#issuecomment-386777121, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHmq7gVS-8azJMVst2Ghs1rSdHoLETrks5tvSRFgaJpZM4MMTKz .
Since the reference given above does not work anymore today, may I suggest instead the following (valid) reference:
- https://sourceforge.net/p/gdcm/gdcmdata/ci/master/tree/undefined_length_un_vr.dcm
Tested with both DCMTK and GDCM.
We are still seeing the issue. Not sure on the image source being Siemens Avanto or Skyra though.
A consequent problem is that the error thrown includes the entire bytestream dataSet
, so if we are logging all thrown errors, the log files gets to GBs very quickly and the application is too choked writing the log to do anything else.
@amrita-syn Do you have an anonymized DICOM you can submit for us to troubleshoot with? If your DICOM isn't Avanto or Skyra, I'd recommend making a new issue and attaching there. Since so many vendors are different, there's a wide variety of reasons we could get a buffer overrun and keeping them as separate issues makes it easier to manage (as well as easier for people to find details about a specific cause).
In my work, the tag before the exception is thrown is the culprit. After remove the tag element, it works again.
A consequent problem is that the error thrown includes the entire bytestream
dataSet
, so if we are logging all thrown errors, the log files gets to GBs very quickly and the application is too choked writing the log to do anything else.
The debug output is indeed very annoying. it is still happening btw. Just had it with a CT Brilliance 64 from Philips
@matthiasg Can you provide a de-identified file by any chance and open a new issue? I can troubleshoot or look into a fix pretty quickly if you can get me a file.
I'm going to close this ticket because it's become a catch-all for buffer overrun, which can be caused by many things. The files linked in this issue now work in dicomParser. Also, the debug output issue is tracked here.