I keep getting this when I use the preprocessing script. Bizarrely, I have noticed that as long as I have some other window open e.g. web-browser, task manager etc and that is in front of PI i.e. is the active window, then PI runs in the background and finishes the process without throwing the invalid memory read ...error. Weird but it works consistently.