Perhaps the reason of your crash is because the `CoverMatrix` array is quite large, being 15625x2500 boolean (8 bits), so at least 39 MB. Using a `CoverMatrix` variable directly is larger than the program stack. That's the reason I'm using `CoverMatrixRef` to have the cover matrix allocated in the heap.
That's strange that the first block runs...
