A Surprised Error in CVX

Recently, I have met a puzzled error in using CVX. There is a sentence in my codes as follows.
objective_terem = adjust_constant * sum(log(1+P.g));
where adjust_constant and g are the given constants, P is the variable. Both P and g are Nx1 vectors. adjust_constant is a adjustable scalar parameter, but it is aways larger than or equal to 0.
My codes usually runs correctly, however, once a while, a surprised error occurs at the above sentence. The error information is as follows.
Error using cvx/times (line 173)
Disciplined convex programming error:
cannot perform the operation: {positive constant}.
{concave}
Error in cvx/mtimes (line 36)
z = feval(oper,x,y);
How surprised and puzzled? The sentence above completely conforms to the DCP ruleset, it seems there is no possibility to have an error. What’s worse, it usually runs correctly, error occurs only once a while. Why does this kind of error happen?
I need your help, many thanks!