OpenMarine
OpenCPN configuration file reset on crash - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: Bug Reports (https://forum.openmarine.net/forumdisplay.php?fid=4)
+--- Thread: OpenCPN configuration file reset on crash (/showthread.php?tid=1143)



OpenCPN configuration file reset on crash - Barentsailor - 2018-05-04

Hello,

I have a Raspberry pi 3 running OpenPlotter v 0.17.1 plugged on my boat battery through 24v to usb converter.
The problem is that when the Raspberry (running Open CPN 4.8.4) is shut down abruptly (power shutdown due to low battery etc), the OpenCPN configuration file get corrupted. At the next startup the configuration file is blank, and OpenCPN replaces it with the default one. Meaning that I need to configure again everything in OpenCPN including NMEA ports, default chart folders etc...

I found a workaround by backing up the configuration file and replacing at each Raspberry crash...

Anyone experiencing the same issue?


RE: OpenCPN configuration file reset on crash - Barentsailor - 2018-05-04

I did some test and found that the OpenCPN configuration file (opencpn.conf) becomes blank after an abrupt shutdown, and this even if OpenCPN was not running during the shutoff.
So it seems to be related to OpenPlotter rather than OpenCPN.


RE: OpenCPN configuration file reset on crash - Barentsailor - 2018-05-04

So to temporary solve this issue I added a script on startup to copy a backup file "opencpn.conf" to the .opencpn folder in the home directory.

You'll find some info for the script here: https://raspberrypi.stackexchange.com/a/8735
And the command is: cp /home/pi/Backup/opencpn.conf /home/pi/.opencpn/opencpn.conf

/home/pi/Backup/opencpn.conf being my backup file with the correct OpenCPN configuration.

Need to go sailing now, but if someone has a better solution to the problem... post here