This was the lowest in the callstack. I did look carefully in my code, the buttoncontrol contains almost 1500 lines so it is much to look for manually. I did have a feeling that I did something wrong with the vectors and as you said, I did access positions that did not exist.
I also began the acess at 1 and not 0.
So some changes like this did it. It was a vectorproblem.
So I did change this code so now it seems to actully work. An automatic program did press the button for 24 hours(1200 times) with no Errormessage
Thank you!