Closed leamas closed 7 months ago
What does opencpn-cmd
do that normal OpenCPN does not? I'm just looking at the plugin working just fine on both my arm64 and x86_64 Bookworm...
Yes, it works just fine when installed from the GUI.
It might be that base_platform isn't initiated so the plugin does not get the data directory it needs. Will look into this tomorrow. But even so, it should not throw an exception and terminate application.
I suppose all this is going to be resolved by simply moving stuff away from the constructor to ::Init
, but yes, this old codebase would certainly deserve being made more robust.
At first sight I don't see unhandled wxSQLite3Exception
, but evidently there must be some somewhere
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1 0x00007ffff63cad2f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2 0x00007ffff637bef2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007ffff6366472 in __GI_abort () at ./stdlib/abort.c:79
#4 0x00007ffff669d919 in () at /lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff66a8e1a in () at /lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff66a7e89 in () at /lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007ffff66a85a6 in __gxx_personality_v0 () at /lib/x86_64-linux-gnu/libstdc++.so.6
#8 0x00007ffff7ec7934 in () at /lib/x86_64-linux-gnu/libgcc_s.so.1
#9 0x00007ffff7ec7ff1 in _Unwind_RaiseException () at /lib/x86_64-linux-gnu/libgcc_s.so.1
#10 0x00007ffff66a90cb in __cxa_throw () at /lib/x86_64-linux-gnu/libstdc++.so.6
#11 0x00007ffff084e6fe in () at /home/al/.local/lib/opencpn/libobjsearch_pi.so
#12 0x00007ffff099ceb9 in wxSQLite3Database::Close() () at /home/al/.local/lib/opencpn/libobjsearch_pi.so
#13 0x00007ffff085dfdc in objsearch_pi::clearDB(wxSQLite3Database*) () at /home/al/.local/lib/opencpn/libobjsearch_pi.so
#14 0x00007ffff085e01b in objsearch_pi::~objsearch_pi() () at /home/al/.local/lib/opencpn/libobjsearch_pi.so
#15 0x00007ffff085e389 in objsearch_pi::~objsearch_pi() () at /home/al/.local/lib/opencpn/libobjsearch_pi.so
#16 0x000055555578c7aa in PluginLoader::LoadPluginCandidate(wxString const&, bool)
(this=this@entry=0x5555559b9110, file_name=..., load_enabled=load_enabled@entry=false) at /home/al/src/OpenCPN/model/src/plugin_loader.cpp:588
#17 0x000055555578e354 in PluginLoader::LoadPlugInDirectory(wxString const&, bool)
(this=this@entry=0x5555559b9110, plugin_dir=..., load_enabled=load_enabled@entry=false) at /home/al/src/OpenCPN/model/src/plugin_loader.cpp:687
#18 0x000055555578f414 in PluginLoader::LoadAllPlugIns(bool) (this=0x5555559b9110, load_enabled=load_enabled@entry=false)
at /home/al/src/OpenCPN/model/src/plugin_loader.cpp:425
#19 0x000055555563235c in CliApp::list_plugins() (this=0x5555559a1660) at /home/al/src/OpenCPN/cli/console.cpp:191
#20 CliApp::OnCmdLineParsed(wxCmdLineParser&) (this=0x5555559a1660, parser=...) at /home/al/src/OpenCPN/cli/console.cpp:444
#21 0x00007ffff72a306b in wxAppConsoleBase::OnInit() () at /lib/x86_64-linux-gnu/libwx_baseu-3.2.so.0
Good night!
ah, already fixed for next release in https://github.com/nohal/objsearch_pi/commit/395e90e43d2bde67e7efe6a962959cd8c49ddedf
Describe the bug After CLI installation of Objsearch OpenCPN terminates and plugin must be manually removed.
To Reproduce Steps to reproduce the behavior:
opencpn-cmd install-plugin ObjSearch
opencpn-cmd list-plugins
terminate called after throwing an instance of 'wxSQLite3Exception'
Expected behavior The plugin should be installed and commands such as
list-plugins
anduninstall-plugin
should workDesktop (please complete the following information if applicable):
Additional context I have installed all available plugins, this is the only one which cannot be installed, listed and uninstalled using the CLI. I'm worried about the un-caught exception which probably has potential to bite us in other contexts.