Distance tool outputs tons of errors and bad message when measuring and the mouse goes out of the map extents (but still in the map window).
This happens when a map is zoomed out too much and there is some out of bounds areas showing.
Possible solutions would be to continue measuring the distance even though it's past the extents, show an elegant message once past the extents, or to measure only up to the last position within the extents (may be difficult if the mouse continues to move around).