Dear golang-nuts group,
I've been battling with an extremely confusing issue in the past days and I
think I have found the cause, still I don't know WHY it causes this.
Basically I have a function that takes two arrays which each contain the
same data type with two integer values and transfers a single item from one
to the other,
effectively raising the length of the receiver by 1 and lowering the length
of the other one. Here is a gist of the function used.<https://gist.github.com/b282721f40b2abf466c4>
But after hours of debugging I figured this function is the function that
triggers the weird value switches and duplications.
Sometimes, the array that get's one item taken away "loses" the item on
index 0 and receives a duplicate in a random index,
sometimes there are even multiple pointers to one memory address popping up
in any of the arrays.
I don't know of how much use this is to you, but I also uploaded my
extremely verbose debug file: Also as a gist. ;)<https://gist.github.com/b67ff95883976601e151>
This will need some explanation, but if you really want to take a look,
line 12 to 16 displays the first occurence of a Transfer-call, with the
direction "RTL" (right-to-left).
Comparing the lines 9 and 16 will result in way more differences than there
should be, the only one would be the "loss" of the item at index 4.
If anyone knows what to do, what I did wrong, I'd appreciate an answer.
Should you want more data, just ask for it, I'd be more than happy to