find_path
doesn't have a clear base case, since the if
at the beginning is commented out. The very first thing it does, is call itself again with cell to the right. And the first thing that call does, is call itself again, with the cell to the right of that. There's nothing to stop it from just falling right off the end of the array, at which point it's just dumb luck you haven't caused missiles to launch somewhere.
Even if that weren't the case, there's nothing keeping it from getting stuck between a cell with a wall to the right, and the cell just to the left of it. You try to go right, but can't, so you go left. Next step, you can go right again, so you do. Repeat for all eternity (or at least til you eat up your stack).