weather_routing_pi
weather_routing_pi copied to clipboard
Boat Xml: Crash if a polar file in the list is missing.
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.
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".
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?
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.
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.
(At least) A proper warning would be nice. Keep it open, I might implement this one day.
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