Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 05-09-2020, 16:19   #1
Registered User

Join Date: Jun 2017
Posts: 359
Turn off loading in safe mode

Is there a way to turn off loading into safe mode prompt? There is always someone who is a ‘yes’ man on board.
They see that prompt click ‘yes’ and wipe out whole config.
It does more harm than help.

Thanks
mgrouch is offline   Reply With Quote
Old 06-09-2020, 01:04   #2
Registered User
 
AISEAG's Avatar

Join Date: May 2012
Location: Dahouet (Brittany)
Boat: BENETEAU
Posts: 490
Re: Turn off loading in safe mode

@Mgrouch

Is that relevant with OpenCPN or with the OS ?

Serge
AISEAG is offline   Reply With Quote
Old 06-09-2020, 04:07   #3
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,625
Re: Turn off loading in safe mode

Quote:
Originally Posted by mgrouch View Post
Is there a way to turn off loading into safe mode prompt? There is always someone who is a ‘yes’ man on board.
They see that prompt click ‘yes’ and wipe out whole config.
It does more harm than help.

Thanks

Does mean that OCPN did not shut down properly the time before. On which OS and version of OCPN are you?
bcn is offline   Reply With Quote
Old 06-09-2020, 07:55   #4
Registered User

Join Date: Jun 2017
Posts: 359
Re: Turn off loading in safe mode

Quote:
Originally Posted by bcn View Post
Does mean that OCPN did not shut down properly the time before. On which OS and version of OCPN are you?


Yes it does, but if someone clicks ‘yes’
OpenCPN loses all configs. Also
I’ve seen minor version upgrades made it lose all previous configs.

Thanks
mgrouch is offline   Reply With Quote
Old 24-09-2020, 10:51   #5
Registered User

Join Date: Jun 2015
Boat: Chantier duu Port Rézé les Nantes, Mopélia 2000
Posts: 90
Re: Turn off loading in safe mode

This can save you a lot of work :

On a regular basis, when O is going smoothly, close it gracefully, open the opencpn dir, copy the opencpn.conf (or .ini /OS depending) and save it in a "Backup" dir. This is to be repeated after updates, new version or any impacting change...

One example, when the "safe mode" has hit you :

  • restart OpenCPN even in safe mode, then quit normally,
  • copy the opencpn.conf/ini from your Backup dir,
  • and paste it in the opencpn dir, confirm overwrite...

O will rebuild database on next start, et voilŕ !
(not an ideal solution, but it works !)
Didier B is offline   Reply With Quote
Old 27-09-2020, 17:32   #6
Registered User

Join Date: Jun 2017
Posts: 359
Re: Turn off loading in safe mode

Maybe having a command line argument to turn off the prompt screen all together and not touch the configs would help. When the software becomes too smart that it starts to modify itself or wiping out its own configs without user realizing it the troubleshooting and maintenance becomes even harder. I’d rather have just fail consistently.
mgrouch is offline   Reply With Quote
Old 28-09-2020, 00:22   #7
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Turn off loading in safe mode

I tested just killing an instance on Ubuntu 20.04 and restarting. I did get the dialog and answered Yes (for once). But.... there was no difference from an ordinary session. I had expected that OpenGL would be turned off, at least, but it was still active. I did this a couple of times with the same result.
Comparing opencpn.conf , a version saved before the test with the version at the end of the test, there were only cosmetic differences.

This problem obviously needs more testing.
What operating system?
Anyone with the same results as me using Linux?

mgrouch.... what operating system?

Thomas
cagney is offline   Reply With Quote
Old 28-09-2020, 07:33   #8
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,257
Re: Turn off loading in safe mode

cagney....


The "safe mode" logic was designed and implemented to protect against rogue plugins only. And that is all it is meant to do. No other run-time configurations should be affected by the choice of "yes" to the dialog.


I agree that the language and "polarity" of the dialog can be confusing.
And I am disturbed by reports that answering "Yes" will corrupt previous configurations and data storage.


Dave
bdbcat is offline   Reply With Quote
Old 28-09-2020, 07:49   #9
Registered User

Join Date: Jun 2017
Posts: 359
Re: Turn off loading in safe mode

Quote:
Originally Posted by bdbcat View Post
cagney....


The "safe mode" logic was designed and implemented to protect against rogue plugins only. And that is all it is meant to do. No other run-time configurations should be affected by the choice of "yes" to the dialog.


I agree that the language and "polarity" of the dialog can be confusing.
And I am disturbed by reports that answering "Yes" will corrupt previous configurations and data storage.


Dave


I’m on raspberry pi 4 and answering “yes” made it unusable. It forgot all charts locations.

Can it be might be just a check box

Revert to safe mode? Unchecked by default.

And single ‘OK’ button.

instead of two (yes/no)

Thanks,
—MG
mgrouch is offline   Reply With Quote
Old 28-09-2020, 08:23   #10
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Turn off loading in safe mode

Quote:
Originally Posted by bdbcat View Post
cagney....


The "safe mode" logic was designed and implemented to protect against rogue plugins only. And that is all it is meant to do. No other run-time configurations should be affected by the choice of "yes" to the dialog.


I agree that the language and "polarity" of the dialog can be confusing.
And I am disturbed by reports that answering "Yes" will corrupt previous configurations and data storage.


Dave
Dave

OK, but then we have a slight inconsistency in what "Safe Mode" means.

I based my impression of Safe mode on this thread https://github.com/OpenCPN/OpenCPN/pull/1678

Starting OpenCPN from the Command Line like this:

Quote:
opencpn -safe_mode
does indeed start with OpenGL off.

Thomas
cagney is offline   Reply With Quote
Old 28-09-2020, 18:21   #11
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,257
Re: Turn off loading in safe mode

Cagney...


OK, sorry, late addition to the patch, which I missed.
So, indeed, OpenGL is disabled in safe mode.


Code:
void set_mode(bool mode)
{
    safe_mode = mode;
    g_bdisable_opengl = g_bdisable_opengl || mode;
}

However, another slight twist:
This code is only executed if the command line argument is specified. If OCPN is starting after a crash, selecting "YES" only disables plugin loading. That's all.





Does not explain this, though:
I’m on raspberry pi 4 and answering “yes” made it unusable. It forgot all charts locations.


Thanks
Dave
bdbcat is offline   Reply With Quote
Old 28-09-2020, 18:36   #12
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,257
Re: Turn off loading in safe mode

mgrouch...


re:
"I’m on raspberry pi 4 and answering “yes” made it unusable. It forgot all charts locations."

I suspect the chart catalog corruption was the result of the earlier crash that prompted the dialog on next restart, and not the actions of the dialog result itself.


Thanks
Dave
bdbcat is offline   Reply With Quote
Old 28-09-2020, 21:53   #13
Registered User

Join Date: Feb 2012
Location: Austria
Posts: 320
Re: Turn off loading in safe mode

Great that it is now established that in 5.2 there are now two behaviors of safe mode but whats the conclusion?
a.) it is as it is and the manual needs amendment with an somehow cumbersome explanation
b.) the safe modes get unified
c.) the new (5.2) safe mode dialog gets replaced with a simple warning.
d.) like c.) and not a simple warning but a timer delay defaulting to normal start and the option to disable all plugins.

I personally would vote for c.) and invite the user to check the log file.
My2Cent
skipperearly is offline   Reply With Quote
Old 29-09-2020, 11:18   #14
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,257
Re: Turn off loading in safe mode

skipperEarly...


Thanks for your feedback and ideas. We will certainly address this issue in the next official release of OpenCPN.


However, OpenCPN 5.2 will not be updated to correct this anomaly only. In the meantime, a simple workaround is available: (read the dialog, and push the correct button, or just wait 15 seconds). If you want OpenGL OFF to start, there is a separate CLI option for that.




Thanks
Dave
bdbcat is offline   Reply With Quote
Old 03-09-2022, 11:03   #15
Registered User
 
Sea Patroller's Avatar

Join Date: Mar 2019
Location: Germany, Lauenbrück
Boat: Pedro Woudbloemkruiser 35
Posts: 19
Re: Turn off loading in safe mode

Anyone struggling on this.
My solution was to write a start script for O which is called after login. I could even set the fullscreen flag during an automatic startup.
Within that script I am copying a valid config file into place from another location. If O exists normally, the original config is copied to that location back.
If O crashes, that copy will not run but during the start next time, the valid config will be copied in place.
Sea Patroller is offline   Reply With Quote
Reply

Tags
loa

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Yanmar "safe mode" capn_billl Engines and Propulsion Systems 4 06-01-2020 10:16
Coolant in bottom of engine and safe mode chefojfc Engines and Propulsion Systems 7 28-08-2019 14:26
Red Mode / Night Mode on iPad DaveWaltersAus Navigation 35 25-07-2017 17:12
Icom M-802 "Open Mode" (Open/Ham/Dial vs. Standard "marine mode") ka4wja Marine Electronics 0 03-11-2014 06:25
Switching from Liveaboard Mode to Sailing Mode Justin R. Liveaboard's Forum 8 07-02-2012 17:31

Advertise Here


All times are GMT -7. The time now is 01:06.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2023, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2023, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.