@Override protected void declareImages(int width, int height) { // You must call the super or else it will crash horribly super.declareImages(width, height); derivX.reshape(width, height); derivY.reshape(width, height); }