Bug in PluginStorage Area - Returning Error in StorageRemove forces Orthanc to restart

Hello Sebastien,

I just discovered an issue I consider as a bug in the StorageArea plugin Api

When I return the OrthancPluginErrorCode_StorageAreaPlugin value as result of the StorageRemove() method, the Orthanc service obviously restarts (a new Logfile is created and Orthanc shows the normal starting logs as usual)

The last “pre-mortem” log entry before restarting is the following:

E0412 01:03:11.525202 PluginsManager.cpp:164] Cannot rollback a non-existing transaction

This Error only occurs in the StorageRemove() method, the other methods are working as supposed when returning the OrthancPluginErrorCode_StorageAreaPlugin value.

I am currently running the Orthanc 1.5.3 version.

Cheers
Knut

Dear Knut,

Please provide a MWE so that we can consider working on a fix:
https://en.wikipedia.org/wiki/Minimal_working_example

Also, please upgrade to the latest release (Orthanc 1.5.6 at the time of writing).

Regards,
Sébastien-

Hello Sébastien,

thanks for the quick reply!

The MWE actually is quite simple:

The StorageRemove function just returns the Error Code:

static OrthancPluginErrorCode StorageRemove(const char* uuid,
	OrthancPluginContentType type)
{
 
	return OrthancPluginErrorCode_StorageAreaPlugin;
}

If you try to delete an image / patient via the Orthanc Explorer with the plugin running, Orthanc restarts and delivers the Error Message:

E0412 01:03:11.525202 PluginsManager.cpp:164] Cannot rollback a non-existing transaction

In contrast, the StorageRead and the StorageCreate functions are working as supposed and documented. When I return the Error Code Orthanc continues and just documents an “error in the StorageArea plugin”

Dear Knut,

First of all, please excuse the delay: I had completely forgotten this thread.

The following changeset that is pending in the mainline (and that will be part of forthcoming Orthanc 1.6.0) should solve your issue:
https://bitbucket.org/sjodogne/orthanc/commits/643b5ee86f92fa1499eef4b73681f8af69a83cd8

Kind Regards,
Sébastien-

Hi Sébastien,

Just saw your answer - thank you :slight_smile: