[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
|