cuSPARSE cusparseDbsrsv2_solve weird error

Hello everyone,

I am trying to develop a BILU0 preconditioner and when I get to the solving phase (cusparseDbsrsv2_solve) I get a CUSPARSE_STATUS_INVALID_VALUE. The weird thing is that all the above functions returned CUSPARSE_STATUS_SUCCESS. Also the input in the cusparseDbsrsv2_solve is correct (I printed them to be sure)

Any ideas about what the problem may be?

Found the error that took me 2 days of my life… (As you can guess I am new to cusparse)