  We give a Hodge-theoretic criterion for a Calabi--Yau variety to have finite
Weil--Petersson distance on higher dimensional bases up to a set of codimension
$\geq 2$. The main tool is variation of Hodge structures and variation of mixed
Hodge structures.
  We also give a description on the codimension 2 locus for the moduli space of
Calabi--Yau threefolds. We prove that the points lying on exactly one finite
and one infinite divisor have infinite Weil--Petersson distance along angular
slices. Finally, by giving a classification of the dominant term of the
candidates of the Weil--Petersson potential, we prove that the points on the
intersection of exact two infinite divisors have infinite distance measured by
the metric induced from the dominant terms of the candidates of the
Weil--Petersson potential.
