When a city has just enough food for the next level, and no more, it will be stuck at population one less than the one that can be supported.
This particularly annoying when your city has 50 food, and is stuck at 49, preventing you from building all the growth buildings.
This cannot be working as intended, can it?
You are probably doing
if(population + growth > food) effectiveGrowth = 0;
instead of
if(population + growth > food) effectiveGrowth = food - population;