Hi,
Same error is reported a short while ago. Also it hade to do with lat1 == lat2 if my volatile memory is right
a workaround could be to check the latitude, and if it is same then increase one of them with a small value, eg 0.00001 whitch is a little more than 1 meter.
maybe it is better to catch the exception and if exception occure the change the value.