Um...you do know what Length returns for a multidimension array, yes?
And that it will return the same value each time you call it?
Dim spalins2 As Double(,) = New Double((spalings.Length - 1), (spalings.Length - 1)) {}
And
For x As Integer = 0 To spalings.Length - 1
For j As Integer = 0 To spalings.Length - 1
So how many elements do you think it's going to investigate?
The answer is: it returns the total number of elements - in your case "8".
So your loop will execute 8 * 8 times, and try to look at 64 elements. So your program will crash.
You need to look at the GetUpperBound method:
Array.GetUpperBound Method (Int32) (System)[
^]