G28 X or G28 Y and it moves to the wrong direction.
Unplug endstop connectors on the fly and mess up software status. Power OFF printer, make sure endstops are plugged and power ON.
Wrong coordinate in homex.g or homey.g.