using different files with different coordinate systems usually causes this kind of error, the solution is to use files with the same coordinate systems.