Several energies measuring jump discontinuities of a unit length gradient held are considered and are called defect energies. The main example is a total variation I(phi) of the hessian of a function phi in a domain. It is shown that the distance function is the unique minimiser of I(phi) among all non-negative Lipschitz solutions of the eikonal equation \grad phi\ = 1 with zero boundary data, provided that the domain is a two-dimensional convex domain. An example shows that the distance function is not a minimiser of I if the domain is noncovex. This suggests that the selection mechanism by I is different from that in the theory of viscosity solutions in general. It is often conjectured that the minimiser of a defect energy is a distance function if the energy is formally obtained as a singular limit of some variational problem. Our result suggests that this conjecture is very subtle even hit is true.