Some questions about log_det function,
Did you use the “optimal” variable value of a previous CVX problem instance to this problem? if so, the previous problem could have been infeasible, unbounded, or encountered numerical difficulty, so that the variable values were NaN after CVX completed. This resulted in NaN input to a subsequent CVX problem instance, which CVX considers to be invalid, hence the error message.
As for log)det(X) being different than log(det(X)), please show us the details supporting your claim.
It is not q good idea to use quiet until you have verified everything is working correctly, which evidently it is not yet.
help log_det
log_det Logarithm of the determinant of an SDP matrix.
For a square matrix X, log_det(X) returns
LOG(DET(X))
if X is symmetric (real) or Hermitian (complex) and positive semidefinite,
and -Inf otherwise.When used in a CVX model, log_det(X) causes CVX's successive approximation method to be invoked, producing results exact to within the tolerance of the solver. Therefore, whenever possible, the use of DET_ROOTN(X) is to be preferred, because the latter choice can be represented exactly in an SDP. For example, the objective MAXIMIZE(log_det(X)) can be (and should be) replaced with MAXIMIZE(DET_ROOTN(X)) in fact, log_det(X) is implemented simply as N*LOG(DET_ROOTN(X)). Disciplined convex programming information: log_det is concave and nonmonotonic; therefore, when used in CVX specifications, its argument must be affine.

