Zhikov showed 1986 with his famous checkerboard example that functionals with variable exponents can have a Lavrentiev gap. For this example it was crucial that the exponent had a saddle point whose value was exactly the dimension. In 1997 he extended this example to the setting of the double phase potential. Again it was important that the exponents crosses the dimensional threshold. Therefore, it was conjectured that the dimensional threshold plays an important role for the Lavrentiev gap. We show that this is not the case. Using fractals we present new examples for the Lavrentiev gap and non-density of smooth functions. We apply our method to the setting of variable exponents, the double phase potential and weightedp-energy.