|
|
18-10-2021, 01:43
|
#16
|
Registered User
Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 287
|
Re: OpenCPN Beta Version 5.5.1015 Released
Quote:
NOFIX....31. In the Route & Mark Manager window, if you select a mark, route or track and click on Properties, that window opens behind the manager window.
You cannot bring it to the front. You have to move it to one side.
On MacOS Big Sur 11.6
Resolution: That is MacOS Z-order policy as implemented by wxWidgets.
|
I hit this problem when I implemented multiple consoles in the JavaScript plugin. After trying several strategies, I settled on one that works just fine. Here's the code from the plugin. Obviously, you have to connect the activate event.
Code:
void Console::OnActivate(wxActivateEvent& event){
wxDialog* pConsole = wxDynamicCast(event.GetEventObject(), wxDialog);
long int style = pConsole->GetWindowStyle();
if (event.GetActive()) pConsole->SetWindowStyle(style | wxSTAY_ON_TOP);
else pConsole->SetWindowStyle(style ^ wxSTAY_ON_TOP);
};
|
|
|
18-10-2021, 01:58
|
#17
|
Registered User
Join Date: May 2012
Posts: 1,209
|
Re: OpenCPN Beta Version 5.5.1015 Released
NOREPRO: 28 ... Now resolved. A clean install and the issue did not reappear.
Mike
|
|
|
18-10-2021, 15:18
|
#18
|
Registered User
Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 287
|
Plugin deinit problem
For the JavaScript plugin v0.4, I did a lot of work getting it to clean up properly on plugin deactivation. For each console, it has to call any onExit function in a running script, terminate running scripts, close windows, release the JavaScript engine contexts, etc. and then delete the consoles. It is working fine and robustly in OCPN v4.2.
However, on MacOS under OCPN v4.5.1015 (and v4.5.928), deactivating the plugin (or quitting OCPN) causes OCPN to crash. The plugin logs when the deinit process starts and again when it finishes but in this case nothing is appearing in the log file at all when the plugin is deactivated. This could be because it never gets as far as logging the start of the deinit or the message never gets into the log file because of the crash.
The crash report shows a seg fault at
Quote:
libwx_osx_cocoau_core-3.1.5.0.0.dylib 0x00000001093271e8 wxWindow::MacPaintChildrenBorders() + 168
|
but the plugin is not referenced in the traceback. So it is most likely that something is left uncleaned up causing OCPN to crash, rather than a coding error in the plugin.
Of course, we are now under wxWidgets 3.1.5 rather than 3.1.2.
The problem seems similar to what I was seeing before I got the the cleanup in deinit right. It happens even when no scripts are running and deinit only needs to delete the console.
So what is different now under OCPN v4.5? Is deinit not being called properly? Mike has indicated that there may be some other requirement regarding deletion of resources.
I tried to attach the crash report but it is too big for the limit of 1000 bytes for a .txt file.
Any intelligence on this will be much appreciated.
|
|
|
18-10-2021, 15:53
|
#19
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,404
|
Re: OpenCPN Beta Version 5.5.1015 Released
Antipole...
"The plugin logs when the deinit process starts and again when it finishes but in this case nothing is appearing in the log file at all when the plugin is deactivated. This could be because it never gets as far as logging the start of the deinit or the message never gets into the log file because of the crash."
Lets see the log entries pertaining to shutdown, please.
AFAIK, deInit() is happening correctly, or at least it is for other plugins.
Also, if you plugin is available for linux, I could test that and thus compare platforms and wx version differences.
Dave
|
|
|
18-10-2021, 16:54
|
#20
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,404
|
Re: OpenCPN Beta Version 5.5.1015 Released
Antipole....
re:
"After trying several strategies, I settled on one that works just fine."
Good call. Your solution is cleaner than mine.
Implemented in OCPN core for routes/tracks/waypoints, in github master now.
MacOS installer package is:
https://dl.cloudsmith.io/public/davi....3d0d9784f.pkg
bcn:
Please confirm solution.
Thanks for the code!
Dave
|
|
|
18-10-2021, 17:22
|
#21
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,404
|
Re: OpenCPN Beta Version 5.5.1015 Released
Antipole...
Let's focus on deactivation of a plugin to get repeatable results.
When you deactivate a plugin, you should see something like this in the logfile::
"PlugInManager: Deactivating PlugIn:"
This comes from OCPN core, pluginmanager.cpp:1732.
Do you see this?
The requirements of the DeInit() call are as one might expect:
1. Stop all timers created/started by the plugin.
2. Remove toolbar tools that may have been added.
3. Remove any context menu items that may have been added.
4. Remove any Settings tabs that may have been added.
5. Destroy any wxWindow classes created by the plugin, including all their children...
6. Free any global resources claimed, i.e. heap storage.
That's it. Nothing strange or awkward here.
Dave
|
|
|
18-10-2021, 18:32
|
#22
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,404
|
Re: OpenCPN Beta Version 5.5.1015 Released
bcn...
re:
" o-charts_pi 0.9.0.42 does not show up."
A problem with the Beta catalog, MacOS only. Corrected. Please try again now.
Thanks
Dave
|
|
|
18-10-2021, 20:18
|
#23
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,404
|
Re: OpenCPN Beta Version 5.5.1015 Released
mgrouch...
Best solution for OCPN 5.5.x:
1. Right click on any instrument in the route console (for example "TTG"). De-select "Show Highway".
2. Reduce the font sizes for "console legend" and "console value".
This should allow you to access at least the "hamburger" (three bar) button. Touch that button, and the zoom controls will then be visible.
It is a difficult problem on small devices. If we make the data displays small enough to fit on the screen, then it is not readable. It may be a good feature for a future version to allow customization of this display.
Good Luck
Dave
|
|
|
19-10-2021, 00:20
|
#24
|
Registered User
Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,750
|
Re: OpenCPN Beta Version 5.5.1015 Released
Quote:
Originally Posted by bdbcat
bcn...
re:
" o-charts_pi 0.9.0.42 does not show up."
A problem with the Beta catalog, MacOS only. Corrected. Please try again now.
Thanks
Dave
|
Both "z-order of windows for Route Manager" and "o-charts plug-in update" confirmed ok with this version.
Thanks
Hubert
|
|
|
19-10-2021, 03:49
|
#25
|
Registered User
Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 287
|
Re: OpenCPN Beta Version 5.5.1015 Released
Quote:
Also, if you plugin is available for linux, I could test that and thus compare platforms and wx version differences.
|
Dave - tarballs for all platforms apart from MacOS OCPNv5.2 here.
Quote:
The requirements of the DeInit() call are as one might expect:
|
I will get back on this when I have a moment.
|
|
|
19-10-2021, 04:57
|
#26
|
Registered User
Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 1,107
|
Re: OpenCPN Beta Version 5.5.1015 Released
Ubuntu has just released the Ubuntu version 21.10 called Impisch Indi.
Comes with the kernel 5.13.0 and the Gnome 4 version. It is possible to choose the Ubuntu or the Xserver version. The latest worked best for me. Icon right under at start.
Just installed the latest OpenCPN and OpenCPN flatpak version. Both work very well.
Tried the Oesenc plugin 0.9.0.39 and this also works.
Installed the tidal streams for the area around the Netherlands. This also works.
Of course the SignalK server can also installed.
All these are running on my Raspberry Pi 4 with 2 GB.
There is however a problem with the serial ports. These do not show up.
Driver missing ?
Bram
|
|
|
19-10-2021, 07:04
|
#27
|
Registered User
Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,750
|
Re: OpenCPN Beta Version 5.5.1015 Released
Quote:
Originally Posted by verkerkbr
......
Tried the Oesenc plugin 0.9.0.39 and this also works.
.....
Bram
|
o-charts plug-in I would assume? Covering both oeSENC and oeRNC charts...
Hubert
|
|
|
19-10-2021, 07:34
|
#28
|
Registered User
Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 1,107
|
Re: OpenCPN Beta Version 5.5.1015 Released
Hi Hubert,
yes, it is the latest version.
It was easy to install and worked "out of the box" in the new Ubuntu 64 Impisch Indri version 21.10 with Gnome 4.00 and kernel 5.13.0. For the Raspberry Pi 4 2 GB.
Here a sample with the O-charts version of the chartsets Netherlands UK, Belgium.
Regards,
Bram
|
|
|
19-10-2021, 07:52
|
#29
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,404
|
Re: OpenCPN Beta Version 5.5.1015 Released
Antipole...
Testing javascrip plugin on Ubuntu 18.04....
1. If I import the tarball from Cloudsmith, install, and enable...
a) I get no toolbar icon
b) Crashes on deactivate, in DeInit().
2. So, for fun, I fork your github repo and build locally. And this seems to work fine. "Hello from javascript plugin v2.8 All OK". No crash on deactivate.
That's where I am.
Dave
|
|
|
19-10-2021, 09:27
|
#30
|
Registered User
Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 287
|
Re: OpenCPN Beta Version 5.5.1015 Released
Quote:
Originally Posted by bdbcat
Antipole...
2. So, for fun, I fork your github repo and build locally. And this seems to work fine. "Hello from javascript plugin v2.8 All OK". No crash on deactivate.
|
Dave... that's peculiar - v2.8 ? I know nothing about that. That output should have been:
Quote:
Hello from the JavaScript plugin v0.4 2021:05:09
result: All OK
|
Please run the following script:
Code:
print (OCPNgetPluginConfig(), "\n");
Expected output:
Quote:
{"versionMajor":0,"versionMinor":4,"comment":"","A PIMajor":1,"APIMinor":16,"inHarness":false}
result: undefined
|
If you get
Quote:
JavaScript ReferenceError: identifier 'OCPNgetPluginConfig' undefined
|
you have a version before 0.3.
See this thread #4 onwards
|
|
|
|
|
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 |
|
|
|
|
|