OK
here is what you can do. It happened to me and I guess I pinpointed the two main culprits here:
1) you can try to spot all the "undefined" signals in your code in order to make these signals proper '0' or '1'.
2) do you have some asynchronous resets created from synchronous logic. If yes try to eliminate all async. resets that are not the main power-up reset ...
Also:
3) avoid all 'H' and 'L' in your code
4) try to see if there are functional errors
5) pinout constraints not correct / time constraints not correct or complete
And if all this fails
)) try to find the hypothesis you make and is not true in reality <=== This is always a winning exercise.
Goodluck,