I was following Dan Shiffman’s tutorial on Motion Detection and kept getting an
ArrayOutOfBounds error. I couldn’t figure out why so I decided to test the exact same code copied directly from the Coding Train github account.
Lo and behold, I’m getting the exact same error:
ArrayIndexOutOfBoundsException: 230400 . Particularly the editor highlights line 60
color prevColor = prev.pixels[loc];
I’ve tried using the debugging console to verify the values of variables, but can’t see why there would be any issues. I should mention that this exact same code seems to work for Shiffman in the Processing tutorial. Any idea why this would be the case?
Thanks in advance for the help! x