Foaming and cratering are caused by improper application of paint whereby the roller is moved hastily over the surface. This can also happen when the roller or brush is moved over the surface more frequently than required. Sometimes a foam is formed during the mixing process, or even if the brush is vigorously swirled in the paint. Foaming can also be caused by using a can of old latex-based paint that has been sitting around for a year or more. Application of a poor quality paint also causes this problem. Selecting a roller cover that has an incorrect nap length also can cause foaming and cratering.
Sand the cratered area to level it and repaint. Never apply a semi-gloss or a gloss paint without removing any old paint and using a good primer. If the surface is rough or porous, sand it and use a sealer. Also remember to use a roller with a short nap length to apply semi-gloss or gloss paints. Although most paints foam up during mixing and application, good quality paints are specially formulated so that the bubbles from the wet paint break immediately and do not dry up.