 |
|
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
|
|
|
06-09-2020, 01:04
|
#2
|
Registered User
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
|
|
|
06-09-2020, 04:07
|
#3
|
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
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?
|
|
|
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
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
|
|
|
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 !)
|
|
|
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.
|
|
|
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
|
|
|
28-09-2020, 07:33
|
#8
|
Marine Service Provider
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
|
|
|
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
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
|
|
|
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
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:
does indeed start with OpenGL off.
Thomas
|
|
|
28-09-2020, 18:21
|
#11
|
Marine Service Provider
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
|
|
|
28-09-2020, 18:36
|
#12
|
Marine Service Provider
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
|
|
|
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
|
|
|
29-09-2020, 11:18
|
#14
|
Marine Service Provider
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
|
|
|
03-09-2022, 11:03
|
#15
|
Registered User
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.
|
|
|
 |
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|
|
|
|