have you tried to Improve the Radius? and where the program needs to stop/wher you dont need a MoveP to use a moveL?
my teacher explained to me: "MoveP is like asking to ride a car at constant speed. when your speed is like 100km/h a turn on a highway(r=300) is possible but approaching a small intersection (r=1) with 100km/h is ridiculous and would result in a crash (like the error).
Also a 180 degree turn could give a error like this.
It sounds like you are attempting to make a direction change with a near zero blend radius. This is physically impossible at a constant speed as it would require an infinite deceleration rate in the first direction of motion and an infinite acceleration in the new direction of motion.
You may need to make the two directions of motion as separate moves. This may require you to turn off the flow of material after your run off the edge of the window in direction 1. and resume the flow when you get to the window again from the other direction.