You were right, it was the clicking of the window title bar. When you clicked the window title bar DarkBASIC freezes, making the timer based movement to jump the ball forward. This then caused the ball to try get the tile data from an array using invalid indexes.
I fixed this by checking the index values before the array, and by making the timer based movement take into account when any unexpected long pauses.
Thanks for that.

Is there anything else before i upload a new version?
Quote: "wow how long is your code "
Nearly 3000 lines. But I used a couple of includes with lots of other unused functions.
EDIT: Also I see you got a highscore.