>Make a breakpoint when cCinv changes value in the debugger.
Ok, the mystery is solved. As always it was totally my fault. Since I was selecting in the scan loop, I had to release array in the loop.
So, I'll keep sum solution instead of select sum.
If it's not broken, fix it until it is.
My Blog