Bug 33

Summary: StoreScp.cpp 219: Exception while storing DICOM: Cannot write to file
Product: Orthanc Reporter: Sébastien Jodogne <s.jodogne>
Component: Orthanc CoreAssignee: Sébastien Jodogne <s.jodogne>
Status: RESOLVED INVALID    
Severity: normal    
Priority: ---    
Version: unspecified   
Hardware: All   
OS: All   

Description Sébastien Jodogne 2020-06-29 15:12:01 CEST
[BitBucket user: Eddie Szulc]
[BitBucket date: 2017-02-20.15:25:56]

Orthanc 1.2.0 on Windows.

A customer received the following error a number of times:
StoreScp.cpp:219] Exception while storing DICOM: Cannot write to file
I presume that the error is due to a bad network, because when the Retrieve is repeated, it is successful.

I use a plugin that is called via OnStoredCallback, so after C-STORE has read a DICOM record. I call OrthancPluginGetInstanceData to get the instance data to write to another file.

I expected that OrthancPluginGetInstanceData would copy the loaded data from memory, but I see that it sometimes produces the StoreScp error, which means that it uses StoreScp to reload the instance again (I presume). What is strange is that the original C-STORE never fails, presumably because it retries after an error. I suspect that OrthancPluginGetInstanceData should also retry after an error. Of course when OrthancPluginGetInstanceData returns a 0, I can retry myself (but I shouldn't need to).

My questions are:
- Why does OrthancPluginGetInstanceData load the data again if it is already loaded?
- Can OrthancPluginGetInstanceData be made robuster against network errors?
- Should I have coded this differently?

Eddie
Comment 1 Sébastien Jodogne 2020-06-29 15:19:30 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2017-02-20.15:29:01]

This is not a bug report, but a question and an open discussion. Please post your inquiry to the Orthanc Users public forum instead:
https://groups.google.com/forum/#!forum/orthanc-users

Regards,
Sébastien-