Exception sending DIMSE: OutOfMemoryException

50 views
Skip to first unread message

Toshko Andreev

unread,
Apr 5, 2017, 9:43:52 AM4/5/17
to Fellow Oak DICOM
Greetings I am getting the following exception when trying to send a JPEG Baseline encoded file (it is very large)

[Error] Exception sending DIMSE: OutOfMemoryException { Message: "Exception of type 'System.OutOfMemoryException' was thrown.", Data: [], InnerException: null, TargetSite: Void DoWalk(Dicom.IDicomDatasetWalker, System.Collections.Generic.Queue`1[Dicom.DicomItem]), StackTrace: "   at Dicom.DicomDatasetWalker.DoWalk(IDicomDatasetWalker walker, Queue`1 items)
   at Dicom.DicomDatasetWalker.Walk(IDicomDatasetWalker walker)
   at Dicom.Network.DicomService.SendNextMessage()", HelpLink: null, Source: "Dicom.Core", HResult: -2147024882 }

And then after that:
[Error] Exception processing P-Data-TF PDU: FileNotFoundException { Message: "Could not find file 'C:\Windows\TEMP\tmp3042.tmp'.", FileName: "C:\Windows\TEMP\tmp3042.tmp", FusionLog: null, Data: [], InnerException: null, TargetSite: Void WinIOError(Int32, System.String), StackTrace: "   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Dicom.IO.DesktopFileReference.OpenRead()
   at Dicom.IO.Buffer.TempFileBuffer.GetByteRange(Int32 offset, Int32 count)
   at Dicom.IO.Buffer.TempFileBuffer.get_Data()
   at Dicom.Imaging.PixelDataConverter.InterleavedToPlanar24(IByteBuffer data)
   at Dicom.Imaging.Codec.Jpeg.Jpeg8Codec.Decode(DicomPixelData oldPixelData, DicomPixelData newPixelData, DicomJpegParams params, Int32 frame)
   at Dicom.Imaging.Codec.DicomJpegNativeCodec.Decode(DicomPixelData oldPixelData, DicomPixelData newPixelData, DicomCodecParams parameters)
   at Dicom.Imaging.Codec.DicomTranscoder.Decode(DicomDataset oldDataset, DicomTransferSyntax outSyntax, IDicomCodec codec, DicomCodecParams parameters)
   at Dicom.Imaging.Codec.DicomTranscoder.Transcode(DicomDataset dataset)
   at Dicom.Imaging.Codec.DicomCodecExtensions.ChangeTransferSyntax(DicomDataset dataset, DicomTransferSyntax syntax, DicomCodecParams parameters)
   at Dicom.Network.DicomService.SendNextMessage()
   at Dicom.Network.DicomService.PerformDimse(DicomMessage dimse)
   at Dicom.Network.DicomService.<ProcessPDataTFAsync>d__50.MoveNext()", HelpLink: null, Source: "mscorlib", HResult: -2147024894 }

Anders Gustafsson Cureos AB

unread,
Apr 6, 2017, 1:27:10 AM4/6/17
to Fellow Oak DICOM
Thanks for reporting, Toshko!

In the upcoming 3.0.2 release, we have made some enhancements regarding networking memory efficiency. In the best of worlds, those improvements will help you work around this problem. Don't hesitate to download and build the source already today to test whether it works or not.

Otherwise, if you believe this is something we need to fix, e.g. with improved error handling or reporting, please post an issue in the Github repository.

Best regards,
Anders @ Cureos
Reply all
Reply to author
Forward
0 new messages