bdbcat / oesenc_pi

GNU General Public License v2.0
10 stars 17 forks source link

OpenCPN freezes after selecting the oesENC plugin #56

Closed hreuver0183 closed 4 years ago

hreuver0183 commented 4 years ago

The error I specified below is present in OpenCPN-5.0.522 in github and also in the bdbcat binaries. Strace is included. When running gdb, after pressing Crtl-C I see this:

Thread 1 "opencpn" received signal SIGINT, Interrupt. 0x0000007fb6f46a48 in __libc_read (fd=, buf=0x7fffffc9c7, nbytes=1) at ../sysdeps/unix/sysv/linux/read.c:27 27 ../sysdeps/unix/sysv/linux/read.c: No such file or directory. (gdb)

I assume this means generally "some file is missing", but I could not find what file. Not from gdb (I'm a user, not a programmer) and not from the strace, unless oesenc-pi fails because the en_US locale is not present.

opencpn-bdbcat.txt opencpn-bdbcat-freeze

hreuver0183 commented 4 years ago

System: ARM64/Ubuntu18.04 OpenCPN version: github 5.0.522 oesENC version: github 3.3.14

Error I get:

Even if the oeserverd is old I expect the oesenc-dialog to start correctly. However it does not. Also if I edit the opencpn.conf to change bEnabled to 1 I get a similar opencpn freeze.

PS I recommend using "cat" or "more" to check the log since when you use "less" or an editor you'll find all controll characters cluttering up the screen.

hreuver0183 commented 4 years ago

OK, the answer is:

The sglock library is not available for ARM64. Do new charts work with the old oeserverd?

If the old oeserverd still works you can get the functionality without dongle with

--- src/oesenc_pi.cpp 2020-02-16 05:18:36.212075716 +0100 +++ new/oesenc_pi.cpp 2020-02-16 05:18:07.230763367 +0100 @@ -3798,6 +3798,7 @@ bool IsDongleAvailable() {

ifndef OCPNANDROID__

+#ifndef OCPN_ARM64
wxString cmd = g_sencutil_bin; cmd += _T(" -s "); // Available?

@@ -3836,6 +3837,7 @@

  //g_sencutil_bin.Clear();

endif

+#endif

  return false;

}

hreuver0183 commented 4 years ago

Error is identified and a pull request is submitted. If the pull request is accepted than the urgent problem is solved.

ghost commented 3 years ago

Hello, about oe year later, and I seem to have the exact same problem here. Fresh installed ubuntu 64bit on Raspberry Pi, OpenCPN 5.2.4, installed from ppa. Installing oesenc-pi via ppa working fine, version 4.0. But once I try to enable this oesenc-pi plug-in, OpenCPN seems to freeze, until I force-quit OpenCPN. Any help would be appreciated.

hreuver0183 commented 3 years ago

oesenc_pi 4.0.10 is from april 2020. The first working version of oesenc for arm64 is from june/july at the earliest. In july the patch mentioned above was reverted since the underlying problem with oeserverd was solved with an updated oeserverd for arm64.

The solution is simple: get a newer version of oesenc_pi (including oeserverd en libsglarm64). Just for the record: arm64 is only included in the https://github.com/OpenCPN/plugins/tree/master/metadata for ubuntu 18.04. This means those plugins are currently not supported for arm64 for other platforms via the pluginmanager nor via the PPA.

Latest version of the oesenc_pi is somewhere around 4.2.17, a compiled version from github works fine. (And don't forget to install libusb-0.1-4.)

ghost commented 3 years ago

Thanks for this answer. For me as a non-developper, could you please provide me a few more hints about how to download and compile this oesenc-pi version? I have found a tarball download, is it just as simple as downloading this (or from github) and "make" it? Anyway: I live in a Dutch town which has 0183 as phone area code, are we neighbours, more or less?

ghost commented 3 years ago

Sorry, I found proper build instructions here: https://github.com/bdbcat/oesenc_pi/blob/master/INSTALL.md

I should first try these, before asking.

hreuver0183 commented 3 years ago

If it does not work for you, you can try: https://hreuver.home.xs4all.nl/plugins/

There you find a prebuild oesenc plugin for ubuntu 20.04 (4.2.14 an old one) and a prebuild version of a plugin for 20.10 (4.2.18). Besides the binaries you'll also find the build log, if you build yourselves you should get a similar output. the main problem is solving the dependencies (missing dev packages). Binaries are provided as is, if it works for you rejoice if it doesn't, too bad.

On the binaries: I mostly use the default settings without using most parameters to keep the proces easy. The 20.04 was huild on raspberry and the 20.10 on an odroid. For the 20.04 a buildlog is included.

PS I live near the German border, that's some distance from your area. PPS I planned on building some plugins and provide them via cloudsmith and the pluginmanager, but unfortunately I had some setbacks and I have yet to find some time to solve the problems I ran into for plublishing plugins.