The first chapter of Victor Hugo's novel, "Ninety-three", includes a vivid description of the devastation caused on the gun deck of warship when a heavy cannon on a wheeled carriage breaks loose from its chains in rolling seas. Sailors are killed and the ship nearly sunk. It left me in no doubt as to the origin of the term "loose cannon".