When a mixture of air and oil is compressed in a hydraulic cylinder it can ignite and burn, or even explode! This is known as 'dieseling' or the 'diesel effect' -- a reference to the combustion process in a diesel engine. And when dieseling occurs in a hydraulic cylinder it can damage the cylinder and destroy of its seals.
Free air is culprit here and it usually gets into the hydraulic cylinder in one of 2 ways:
The first is past the rod seal. When a double-acting hydraulic cylinder retracts under the weight of its load, the volume of oil being demanded by the rod side of the cylinder can exceed the volume of oil being supplied by the pump. This is usually the result of a faulty or incorrectly adjusted load-control valve.
When this happens, a negative pressure develops in the rod side of the hydraulic cylinder, which can result in air being drawn into the cylinder past its rod seal. This occurs because most rod seals are designed keep high-pressure fluid in, and are not designed to keep air out--see diagram below.
Standard U-cup seal (not energized) in gravity- loaded cylinder.
The second, common way air gains entry into a hydraulic cylinder is during initial installation. For this reason, it's always a good idea to fill the chambers of the cylinder with clean hydraulic oil before connecting its hoses.
And regardless of whether it is possible to pre-fill the cylinder or not, all newly installed hydraulic cylinders should be stroked without load multiple times, taking care not to develop pressure at the end-of-stroke. The reason for doing this is to purge as much air as possible from the cylinder, so that dieseling cannot occur.