The Oto Melara 76mm gun is an unmanned unit and is sighted and fired remotely.
However, without details the reason why the gun discharged is unknown. What can be said with surety is that the gun should have been unloaded and made safe before docking.