indexmenu_n>6

Troubleshooting

For trouble shooting and lower level nitty gritty details, the command line, configuration files and debuggers are your friends.

OpenCPN has a minimal command line interface (CLI)

Usage: opencpn [-h] [-p] [-fullscreen] [-no_opengl] [-rebuild_gl_raster_cache] [-parse_all_enc] [-unit_test_1 <num>]
  -h, --help                    Show usage syntax.
  -p                            Run in portable mode.
  -fullscreen                   Switch to full screen mode on start.
  -no_opengl                    Disable OpenGL video acceleration. This setting will be remembered.
  -rebuild_gl_raster_cache      Rebuild OpenGL raster cache on start.
  -parse_all_enc                Convert all S-57 charts to OpenCPN's internal format on start.
  -unit_test_1:<num>            Display a slideshow of <num> charts and then exit. Zero or negative <num> specifies no limit.

[-unit_test_1]

This command test cycles through all possible charts in the currently loaded chart database, adjusting the viewport to show the loaded chart automatically. The value of this test is clear: it provide an unattended stress test of OpenCPN, It is most fun to watch in quilt modeā€¦

The test runs until all charts in the database have been visited once. Lets think of this as a Beta test tool.

A side-effect of this switch is that it can be used to process a set of ENC charts into SENC files. The first, time consuming processing of ENC charts, can this way be done unattended.

[-no_opengl]

A total switch-off of OpenGL, in a more thorough way than in "Options".

[ -fullscreen ]

Starts OpenCPN in FullScreen mode

Debugging Output Settings for Logfile

The config or ini file contains a lot of settings that are saved between sessions.
Debug statements can be added to produce a lot of output when problems arises in certain areas.
The following statement are recognized and can be added to the config file before a session starts.

[Settings] ...
DebugOpenGL=1   Add logfile debug output for openGL.\\
DebugNMEA=500   Writes 500 NMEA sentences to the log file\\
DebugCM93=1     Writes volumes of debug info relating to CM93 to the logfile.\\
DebugGPSD=1     This will produce some more log output regarding gpsd.\\
DebugS57        Add logfile debug output for S57\\
DebugBSBImg     Add logfile debug output for BSBImg\\
DebugGDAL       Add logfile debug output for GDAL\\

Using a FIFO for ais debugging.

See the code in ais.cpp
`+/* A special test for a user defined FIFO To use this method, do the following: a. Create a fifo $mkfifo /tmp/aisfifo b. netcat into the fifo $nc {ip} {port}> /tmp/aisfifo sample {ip} {port} could be nc 82.182.117.51 6401> /tmp/aisfifo c. hand edit opencpn.conf and make AIS data source like this: [Settings/AISPort] Port=Serial:/tmp/aisfifo

  This also works if you have an ascii ais log
  for which you can simply $cat ais.log> /tmp/aisfifo
  */
  if(m_pPortName->Contains(_T("fifo")))
        goto port_ready;
+`

You may see that if the port name contains the string "fifo", then the requirement for the port to be a TTY is relaxed.

wxWidgets

OpenCPN uses wxWidgets, currently version 3.0.2. wxWidgets Reference Manuals . The Often the version used is behind the most current one, because the developers are trying to maintain compatibility with older OS and Computers as much as is possible. Sometimes wxWidgets has bugs and a different routine is needed, or the developers figure out a workaround. Sometimes the fix is in a more current version of wxWidgets than is being used by OpenCPN so the developers then also try figure out workarounds.

Also a change in wxWidgets generally affects all plugins, so that they all need compilation and the the new versions are no longer operable in previous versions of OpenCPN and the older plugins quite obviously won’t work in the the new version of Opencpn. This is another reason the changes to wxWidgets versions is infrequent.

This PDF to ahttps://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0ahUKEwi864Ce3ZXXAhVMtxQKHbCMCscQFgguMAE&url=https%3A%2F%2Fptgmedia.pearsoncmg.com%2Fimages%2F0131473816%2Fdownloads%2F0131473816_book.pdf&usg=AOvVaw2cPYxEF2DKGrkc5mVx1FMF[wxWidgets History document] might help with wxWidgets issues.