I've put that gun to the locomotive's equipment grid, then entered into it (manual mode) and got the crash.
Locomotive does not have inventory. Could you check the player's inventory in this case?
===
The mod Gun Equipment (0.0.16) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event GunEquipment::on_tick (ID 0)
GunEquipment/AutoGun/control.lua:28: attempt to index local 'ammoInv' (a nil value)
stack traceback:
GunEquipment/AutoGun/control.lua:28: in function 'ReloadUnloaded'
GunEquipment/AutoGun/control.lua:108: in function 'Reload'
GunEquipment/AutoGun/control.lua:215: in function 'OnTick'
GunEquipment/control.lua:20: in function <GunEquipment/control.lua:13>