Strange behaviour: Sometimes Matlab crashes and sometimes it works

I just came across a very strange behavious of CVX, Version 2.1 Build 1110 together with Matlab 2013a and the standard solvers.
When I run my script it sometimes runs through the CVX section sucessfully. But sometimes either a usual error happens, i.e. this one

Index exceeds matrix dimensions.

Error in cvx_reshape (line 39)
jj = temp( :, jj )’;

Error in cvx/mtimes (line 214)
z2 = cvx_reshape( z2, [ nA, nz ], tt, [], t2 );

or this one

Error using sparse
Index into matrix must be an integer.

Error in cvx_reshape (line 41)
x = sparse( ii, jj, x, s( 1 ), s( 2 ) );

Error in cvx/mtimes (line 214)
z2 = cvx_reshape( z2, [ nA, nz ], tt, [], t2 );

or a system error saying matlab encountered an internal problem and has to be closed occurs. It is the very same problem I am running each time without any randomization or anything. The CVX section gets the exact same inputs.
The problem is very huge and it involves the swap space on my SSD. The size of it is set to a fixed value and in the cases when there is no error, 1/3 remains free, approximately. So this shouldn’t be the problem.
The errors always occur before CVX started to write any output to the console.

Any idea what is happening and how to get rid of the errors?