"cvx program iteration error happens"

Why I keep iterating and executing cvx program then it happens with this error?

Somewhere your input data to CVX starts to contain a NaN.

but it don’t state error when iteration number is 1. I don’t know what’s going on?

If you take data for the next iteration from the results of the previous iteration and you don’t check them then who knows. Maybe the previous iteration is infeasible and its results are Nan. Anyhow, just guessing

Thanks for reminding me of checking data. but how should I check data to make sure it won’t get wrong for the rest of iteration.