Dicom SCP error printer

439 views
Skip to first unread message

Marconi Edson Pereira Leite Filho

unread,
Mar 10, 2017, 7:00:37 AM3/10/17
to Fellow Oak DICOM
Good Morning,

Can someone help me with the error below?

The error is only caused when the images are sent from the Carestream Pacs:

Exception processing P-Data-TF PDU: System.NullReferenceException: Object reference not set to an instance of an object.

Anders Gustafsson Cureos AB

unread,
Mar 10, 2017, 9:10:58 AM3/10/17
to Fellow Oak DICOM
Good morning Marconi,

have you built Print SCP from the latest commit in fo-dicom-samples, here: https://github.com/fo-dicom/fo-dicom-samples ?

As an alternative, you might want to try the pre-built binary located here: https://github.com/fo-dicom/fo-dicom-samples/releases/tag/2017.01

Regards,
Anders @ Cureos

Anders Gustafsson Cureos AB

unread,
Mar 10, 2017, 9:31:33 AM3/10/17
to Fellow Oak DICOM
If it still fails with the latest commit or the pre-built binary, please provide the entire log from the Print SCP.

Marconi Edson Pereira Leite Filho

unread,
Mar 10, 2017, 12:22:21 PM3/10/17
to Fellow Oak DICOM
Good afternoon

I used the example of the links above, and still the error persists.

Below is the complete error log.

srvpacsMP <- Association request:
Calling AE Title:       srvpacsMP
Called AE Title:        MarselhesaPB
Remote host:            10.20.0.31
Remote port:            51831
Implementation Class:   Implementation Class UID [1.2.840.113704.7.0.2]
Implementation Version: DCM Pro-11.4.1.0
Maximum PDU Length:     32768
Async Ops Invoked:      1
Async Ops Performed:    1
Presentation Contexts:  3
  Presentation Context:  1 [Proposed]
       Abstract Syntax:  Basic Grayscale Print Management Meta SOP Class
       Transfer Syntax:  Explicit VR Little Endian
       Transfer Syntax:  Explicit VR Big Endian (Retired)
       Transfer Syntax:  Implicit VR Little Endian: Default Transfer Syntax for DICOM
  Presentation Context:  3 [Proposed]
       Abstract Syntax:  Print Job SOP Class
       Transfer Syntax:  Explicit VR Little Endian
       Transfer Syntax:  Explicit VR Big Endian (Retired)
       Transfer Syntax:  Implicit VR Little Endian: Default Transfer Syntax for DICOM
  Presentation Context:  5 [Proposed]
       Abstract Syntax:  Unknown [1.2.840.113704.7.0.1.14]
       Transfer Syntax:  Explicit VR Little Endian
       Transfer Syntax:  Explicit VR Big Endian (Retired)
       Transfer Syntax:  Implicit VR Little Endian: Default Transfer Syntax for DICOM
Received association request from AE: srvpacsMP with IP: 127.0.0.1 
Requested abstract syntax Unknown [1.2.840.113704.7.0.1.14] from srvpacsMP not supported
Accepted association request from srvpacsMP
srvpacsMP -> Association accept:
Calling AE Title:       srvpacsMP
Called AE Title:        MarselhesaPB
Remote host:            10.20.0.31
Remote port:            51831
Implementation Class:   Implementation Class UID [1.2.840.113704.7.0.2]
Implementation Version: DCM Pro-11.4.1.0
Maximum PDU Length:     32768
Async Ops Invoked:      1
Async Ops Performed:    1
Presentation Contexts:  3
  Presentation Context:  1 [Accept]
       Abstract Syntax:  Basic Grayscale Print Management Meta SOP Class
       Transfer Syntax:  Explicit VR Little Endian
  Presentation Context:  3 [Accept]
       Abstract Syntax:  Print Job SOP Class
       Transfer Syntax:  Explicit VR Little Endian
  Presentation Context:  5 [RejectAbstractSyntaxNotSupported]
       Abstract Syntax:  Unknown [1.2.840.113704.7.0.1.14]
       Transfer Syntax:  Explicit VR Little Endian
srvpacsMP <- N-Create request [3]
Create new film session 2.25.6895136659919589539815936711052079665
Exception processing P-Data-TF PDU: System.NullReferenceException: Object reference not set to an instance of an object.
   at Dicom.DicomUniqueIdentifier.<>c.<.ctor>b__1_0(DicomUID x)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Dicom.DicomUniqueIdentifier..ctor(DicomTag tag, DicomUID[] values)
   at Dicom.DicomDataset.DoAdd[T](DicomVR vr, DicomTag tag, IList`1 values, Boolean allowUpdate)
   at Dicom.DicomDataset.DoAdd[T](DicomTag tag, IList`1 values, Boolean allowUpdate)
   at Dicom.Network.DicomNCreateResponse.set_SOPInstanceUID(DicomUID value)
   at DiconPrint.PrintSCP.PrintService.CreateFilmSession(DicomNCreateRequest request)
   at DiconPrint.PrintSCP.PrintService.OnNCreateRequest(DicomNCreateRequest request)
   at Dicom.Network.DicomService.PerformDimse(DicomMessage dimse)
   at Dicom.Network.DicomService.<ProcessPDataTFAsync>d__55.MoveNext()
Connection closed

Marconi Edson Pereira Leite Filho

unread,
Mar 10, 2017, 3:32:05 PM3/10/17
to Fellow Oak DICOM
I captured an error image in debug mode.
I think it may be in the "Mediun Type" tag that it is empty.


Anders Gustafsson Cureos AB

unread,
Mar 13, 2017, 4:59:27 AM3/13/17
to Fellow Oak DICOM
Hello again Marconi,

there is evidently an issue in the DicomNCreateResponse constructor; it does not account for the fact that the Affected SOP Instance UID in the N-CREATE request can be undefined. 

I will post an issue about this in the Github repository and try to provide a fix as soon as possible. In the mean time, in the PRINT SCP sample, you could try to set a dummy UID value to the request before calling the DicomNCreateResponse constructor, e.g.

request.SOPInstanceUID = DicomUIDGenerator.GenerateDerivedFromUUID();

Many thanks for making me aware of this issue!

Best regards,
Anders @ Cureos

Fellipe Pinheiro

unread,
Mar 13, 2017, 8:31:26 AM3/13/17
to Fellow Oak DICOM
Hello Anders.
I'm a friend of Marconi.
It is not possible to set the request.SOPInstanceUID property because it is read-only.

Anders Gustafsson Cureos AB

unread,
Mar 13, 2017, 9:44:33 AM3/13/17
to fo-d...@googlegroups.com
Ah, you're right! I am sorry, I forgot that. What I think you should be able to do is to update the request command directly, like this:

request.Command.Add(DicomTag.AffectedSOPInstanceUID, DicomUIDGenerator.GenerateDerivedFromUUID());

Hope this works!

Anyway, I have made a bug fix in the fo-dicom repository and scheduled it to be included in version 3.0.2, which should be released within the next couple of weeks.Then the problem should go away regardless.

Best regards,
Anders

Anders Gustafsson Cureos AB

unread,
Mar 13, 2017, 10:07:09 AM3/13/17
to Fellow Oak DICOM
BTW, to ensure that this change does not throw in those case where the request already contains an Affected SOP Instance UID, you might want to use AddOrUpdate instead:

request.Command.AddOrUpdate(DicomTag.AffectedSOPInstanceUID, DicomUIDGenerator.GenerateDerivedFromUUID());
Reply all
Reply to author
Forward
0 new messages