weather_routing_pi icon indicating copy to clipboard operation
weather_routing_pi copied to clipboard

Boat Xml: Crash if a polar file in the list is missing.

Open rgleason opened this issue 7 years ago • 6 comments

If a polar file that is listed in the used boat.xml file is missing under the Polars directory, opencpn crashes.

I think there should be a prompt: Boat: _____.xml file lists this Polar: ______.pol but it is mssing. Close, so you can fix it? OR Remove the file reference and contine?

Also if by removing the file reference and there is no other polar file reference listed, what happens? It should not crash.

rgleason avatar Dec 21 '17 04:12 rgleason

It doesn't crash for me, neither on Winddows or on Linux.

Instead, a dialog box is show saying "Boat polar failed: Failed to open .....pol".

stelian42 avatar Dec 21 '17 08:12 stelian42

Yes, that is correct Stelian. Sorry.

However isn't there something more we can do for the user? Perhaps show the full path? Offer to remove the polar line?

rgleason avatar Dec 21 '17 15:12 rgleason

The full path is already shown.

The current behaviour is to ignore all the rest of the Boat.xml file, once the error happened. Meaning that if the first polar is not found, all the polars are removed. If the last polar is not found, only that one is removed.

This behaviour could indeed be improved by ignoring (removing from the Boat.xml) only the polar which cannot be found - after giving proper warning to the user.

stelian42 avatar Dec 21 '17 20:12 stelian42

This behaviour could indeed be improved by ignoring (removing from the Boat.xml) only the polar which cannot be found - after giving proper warning to the user.

Should we keep this open or not? I don't have an opinion.

rgleason avatar Jan 23 '18 14:01 rgleason

(At least) A proper warning would be nice. Keep it open, I might implement this one day.

stelian42 avatar Jan 23 '18 15:01 stelian42

Thanks Stelian. We Windows 10 users are having trouble with the Edit Polar > Dim Tab. Perhaps you can save us as you did with Celestial Navigation,. When we save changes at the Dim Tab windows users crash OpenCPN!

We are using Windows 10 build 1709. Weird things have been happening.

https://github.com/seandepagnier/weather_routing_pi/issues/170

rgleason avatar Mar 19 '18 02:03 rgleason