If it only crashes if you have millions of points then the problem might be that you run out of memory. Please run your executable in a debugger (or get a stack trace) to see where the crash happens and what the error is.
If it only crashes if you have millions of points then the problem might be that you run out of memory. Please run your executable in a debugger (or get a stack trace) to see where the crash happens and what the error is.