but when I increase the value of POINTS_X and POINTS_Y to 10000 Windows crash and I can watch the blue window with the error mesage about a problem with a peripherical (infinite loop detected)
This might be the watchdog kicking in. Try spawning less threads/blocks and measure the execution time while gradually increasing their number. Right now you are trying to launch about 400’000 blocks (with 10’000 points in each dimension). Depending on the complexity of your kernel, this might be quite a lot.