This is rather game logic, than a programming bug.
When i have a city which is built on a food-nonproducing tile, the city's food input and output is balanced.
This means no way to either grow population and start using a tile with food production, and also no way to close the city or die of famine. I tried to produce a settler or worker, but these do not cost a population, and also don't add to a city's population.
This situation is a perfect lock up