Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCPN freezes after selecting the oesENC plugin #56

Closed
hreuver0183 opened this issue Dec 24, 2019 · 8 comments
Closed

OpenCPN freezes after selecting the oesENC plugin #56

hreuver0183 opened this issue Dec 24, 2019 · 8 comments

Comments

@hreuver0183
Copy link
Contributor

hreuver0183 commented Dec 24, 2019

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
Copy link
Contributor Author

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

Error I get:

  • starting op opencpn, OK
  • selecting options-panel, OK
  • selecting plugins, OK
  • selecting oesenc-plugin, OK
  • pushing the enable butten for the pluging => plugin screen greys out and there is no reaction until I end the opencpn session with Ctrl-C
    I added the screen output, since I can't see where the error lies.
    First try is standard, starting opencpn from the commandline
    Second try is starting strace with opencpn. The end is fixed at the same error. It looks like opencpn is looking for a file and can't find it. There is also opencpn looking for a non-existing opencpn-oesenc_pi.mo
    Looks like all locales are installed except for en_US.
    I wonder if opencpn is stuck on the mo-file or on something different.

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
Copy link
Contributor Author

OK, the answer is:

  • ARM64 does still use an old oeserverd, which does not use the "-s" option.
  • there is no error exception, therefore OpenCPN crashes.

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 OCPN__ANDROID
+#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
Copy link
Contributor Author

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

@ghost
Copy link

ghost commented Feb 14, 2021

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
Copy link
Contributor Author

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
Copy link

ghost commented Feb 15, 2021

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
Copy link

ghost commented Feb 15, 2021

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
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant