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

Dashboard_tactics_pi v1.6.6.23 + TP 1.0.180 Prefs + Icons do not work #487

Closed
rgleason opened this issue Nov 6, 2021 · 34 comments
Closed

Comments

@rgleason
Copy link
Contributor

rgleason commented Nov 6, 2021

@bdbcat
I know you are busy, so when you get a chance, could you look at this.

It is in rgleason/dashboard_tactics_pi and is the mnt151-frontend2 branch

I have turned off circleci builds to conserve credits, but appveyor built

  1. Dashboard_tactics v1.6.6.0 had a couple of problems, but when it was issued the Preferences and Toolbar Icons, surely would have worked. They do not now using the most recent test release of OpenCPN, so something changed.
  2. Also I am in the process of updating the frontend for OS builds, now up to 1.6.6.23
  3. Using this updated plugin there are similar problems
  • With showing "Preferences" from Options>PIM Plugin Box Highlighted and originally v1.6.6.0 did not.
  • Showing the toolbar icons in the toolbar when the plugin is enabled.

This plugin is a little more complex than others because you can compile for tactics and dashboard or just dashboard. It uses a "s_common_name" variable in dashboard_tactics_pi which I found to be set at "Dashboard_Tactics" for the version that compiles both sets of instruments.

Note that in the previous version I used the wrong common name. I am going to remove that version now, even if I do not have a replacement yet.

I think the next step is the fix the toolbar icon and preferences and then continue updating the frontend. I have looked at this problem and don't think I should mess with this part of the code.

Can you assist?
Thanks.

PS
There's been good progress and we are getting down to the bottom of the list

PSS
The master branch has Petri's super development version that is not completely compatible with our OS setups but offers more flexibility and features at the cost of complexity.

@bdbcat
Copy link
Member

bdbcat commented Nov 6, 2021

Rick...
Just to be clear, before I dig in...
What is the common name of all previously published versions of this plugin?
That is what this one MUST BE, and cannot be changed.
Looks like DashboardTactics.
Is this correct?

@rgleason
Copy link
Contributor Author

rgleason commented Nov 6, 2021

Yes, it is DashboardTactics, so that means that

CMakeLists.txt line 55 set(COMMON_NAME "Dashboard_Tactics") # Search "getcommonname"in <plugin_pi>.cpp

and

dashboard_pi.cpp line 87  

#ifdef _TACTICSPI_H_
const char *dashboard_pi::s_common_name = _("Dashboard_Tactics");
#endif // _TACTICSPI_H_

Will need to be changed. Thank You!

@bdbcat
Copy link
Member

bdbcat commented Nov 6, 2021

Rick...
Debugging now. Wait. Give me a few hours to work this out.
You should now remove any plugin from master catalog that is known bad.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 6, 2021

Ok, will do now.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 6, 2021

I've opened the PI I am associated with in some way and checked for the issue with icons not showing.

I found one other one autopilot_routed_pi that has similar issues, but the preferences window works.... Ah now I remember that one does not make an icon in the toolbar. It does have a display I believe, and access is through the Preferences. So it is ok I believe.

I am going to do one more check on all the ones I am associated with, for the into and out of Preferences and O crashes, next.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 6, 2021

I did not find any in and out of preferences with a toggle of a preference parameter causing an O crash. I checked all the ones I had installed A large number of them.

@bdbcat
Copy link
Member

bdbcat commented Nov 7, 2021

Rick...
I think that the two changes you mentioned above are enough to fix this thing up.
Though, the second one needs a tweak:
dashboard_pi.cpp line 87

#ifdef _TACTICSPI_H_
const char *dashboard_pi::s_common_name = "DashboardTactics";
#endif // _TACTICSPI_H_

Please copy exactly as I have edited.
Good Luck

Bottom line: When a plugin is first published, whatever CommonName it has been given is permanent, forever.
Dave

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

Ok thanks the common name issue is settled, but the plugin still does not work due to some unidentified icon issue (icons don't show in the toolbar), and the expaned PIM window for the plugin "Preferences" button does not work.

I am going to try to identify and fix this now.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

from opencpn.log the create_pi symbol is not being found.

I believe this is because the icons are not working, I think due to some ifdef logic for building the dashboard tactics plugin or the dashboard only plugin, which selects which icons to use.
(This logic worked before, so something has gone awry perhaps.)

Attached is a summary of the log file
dashboard_tactics-mnt151-ini-errors.txt

I am going to push the current state up to github on the mnt151-frontend2 branch and continue trying to figure this out.

https://github.com/rgleason/dashboard_tactics_pi/tree/mnt151-frontend2

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

Both icons.cpp and icons.h conform to Petri's configuration so the problem is probably not there.
I have changed the api procedures in icons.cpp however to match weather_routing_pi which is more current and works using GetPluginDir

#ifdef PLUGIN_USE_SVG
    wxFileName fn;
//    fn.SetPath(*GetpSharedDataLocation());
//    fn.AppendDir(_T("plugins"));
#ifdef _TACTICSPI_H_
    fn.SetPath(GetPluginDataDir("dashboard_tactics_pi"));
//    fn.AppendDir(_T("dashboard_tactics_pi"));
    fn.AppendDir(_T("data"));
    fn.SetFullName(_T("Dashboard_Tactics.svg"));
    _svg_dashboard_tactics = fn.GetFullPath();
    fn.SetFullName(_T("Dashboard_Tactics_rollover.svg"));
    _svg_dashboard_tactics_rollover = fn.GetFullPath();
    fn.SetFullName(_T("Dashboard_Tactics_toggled.svg"));
    _svg_dashboard_tactics_toggled = fn.GetFullPath();
#else
	fn.SetPath(GetPluginDataDir("dashboard_tactics_pi"));
//    fn.AppendDir(_T("dashboard_pi"));
    fn.AppendDir(_T("data"));
    fn.SetFullName(_T("Dashboard.svg"));
    _svg_dashboard = fn.GetFullPath();
    fn.SetFullName(_T("Dashboard_rollover.svg"));
    _svg_dashboard_rollover = fn.GetFullPath();
    fn.SetFullName(_T("Dashboard_toggled.svg"));
    _svg_dashboard_toggled = fn.GetFullPath();
#endif // _TACTICSPI_H_
#endif //  PLUGIN_USE_SVG

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

I've checked icons.h and icons.cpp against climatology and weather_routing similar files and they are basically the same. I've removed icons from the src folder and put them in an OLD folder. We have all the necessary svg icons under the data folder (and have checked their resolution and rendering) but the img_ definitions should be working first anyway, and they are not.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

I believe the path set for icons is correct and I find svg icons at
C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboard_tactics_pi\data
%localappdata%\opencpn\plugins\dashboard_tactics_pi\data
which is where I expected them. Climatology has a "UserIcons" directory with svg at a similar location, and Weather_routing has svg under "data" in the same relative location.
.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

Is a DLL name mismatch causing the problem?

Checking plugin candidate: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboardtactics_pi.dll

ERROR dynlib.cpp:120 Couldn't find symbol 'create_pi' in a dynamic library (error 127: The specified procedure could not be found

Then this one which fails and then another one is attempted dashboard_tactics_pi.dll

PlugInManager: Cannot load symbol create_pi: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboardtactics_pi.dll
12:12:21.625 MESSAGE pluginmanager.cpp:1149 Checking plugin candidate: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboard_tactics_pi.dll

From recent Opencpn.ini

``
12:12:21.625 MESSAGE pluginmanager.cpp:1149 Checking plugin candidate: C:\Users\fcgle\AppData\Local\opencpn\plugins\climatology_pi.dll
12:12:21.625 MESSAGE pluginmanager.cpp:1149 Checking plugin candidate: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboardtactics_pi.dll
12:12:21.625 MESSAGE pluginmanager.cpp:2195 Plugin is compatible: true
12:12:21.625 MESSAGE pluginmanager.cpp:2284 PlugInManager: Loading PlugIn: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboardtactics_pi.dll
12:12:21.625 ERROR dynlib.cpp:120 Couldn't find symbol 'create_pi' in a dynamic library (error 127: The specified procedure could not be found.)
12:12:21.625 MESSAGE pluginmanager.cpp:2363 PlugInManager: Cannot load symbol create_pi: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboardtactics_pi.dll
12:12:21.625 MESSAGE pluginmanager.cpp:1149 Checking plugin candidate: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboard_tactics_pi.dll
12:12:21.625 MESSAGE pluginmanager.cpp:2195 Plugin is compatible: true
12:12:21.625 MESSAGE pluginmanager.cpp:2284 PlugInManager: Loading PlugIn: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboard_tactics_pi.dll
12:12:21.625 ERROR dynlib.cpp:120 Couldn't find symbol 'create_pi' in a dynamic library (error 127: The specified procedure could not be found.)
12:12:21.625 MESSAGE pluginmanager.cpp:2363 PlugInManager: Cannot load symbol create_pi: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboard_tactics_pi.dll
12:12:21.625 MESSAGE pluginmanager.cpp:1149 Checking plugin candidate: C:\Users\fcgle\AppData\Local\opencpn\plugins\findit_pi.dll

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

I just tried turning off the option to include tactics, so it builds just dashboard and got these errors:

C:\Users\fcgle\source\dashboard_tactics_mnt151\src\dashboard_pi.cpp(792): error C2065: 'OCPN_API_VERSION_MAJOR': undeclared identifier [C:\Users\fcgle\source\dashboard_tactics_mnt151\build\dashboard_pi.vcxproj]
C:\Users\fcgle\source\dashboard_tactics_mnt151\src\dashboard_pi.cpp(797): error C2065: 'OCPN_API_VERSION_MINOR': undeclared identifier [C:\Users\fcgle\source\dashboard_tactics_mnt151\build\dashboard_pi.vcxproj]
C:\Users\fcgle\source\dashboard_tactics_mnt151\src\dashboard_pi.cpp(802): error C2065: 'PLUGIN_VERSION_MAJOR': undeclared identifier [C:\Users\fcgle\source\dashboard_tactics_mnt151\build\dashboard_pi.vcxproj]
C:\Users\fcgle\source\dashboard_tactics_mnt151\src\dashboard_pi.cpp(807): error C2065: 'PLUGIN_VERSION_MINOR': undeclared identifier [C:\Users\fcgle\source\dashboard_tactics_mnt151\build\dashboard_pi.vcxproj]
C:\Users\fcgle\source\dashboard_tactics_mnt151\src\dashboard_pi.cpp(3456): error C2065: 'pos': undeclared identifier [C:\Users\fcgle\source\dashboard_tactics_mnt151\build\dashboard_pi.vcxproj]
  jsonreader.cpp

So perhaps these need to be fixed.

@bdbcat
Copy link
Member

bdbcat commented Nov 7, 2021

Rick...
All works fine for me.
How exactly are you building the plugin?

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

I am building in Windows, using VS2017. Appveyor seems to build it ok too, and it seems to build the dashboard_tactics version and complete, but the Preferences button is not working in the PIM plugin window and when the plugin is enabled the toolbar icon does not show so the plugin does not work and is inaccessible if it is working.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

When I try to build just the Dashboard version it am getting some errors, probably due to some thing Jon is doing with the Testplugin cmake files, because the xml metadata output is not right, and showing the dashboard_tactics version

  <name> Dashboard </name>
  <version> 1.5.12.0 </version>
  <release> 0 </release>
  <summary> Dashboard </summary>

  <api-version> 1.16 </api-version>
  <open-source> yes </open-source>
  <author> Rick Gleason </author>
  <source> https://github.com/rgleason/dashboard_tactics_pi.git </source>

I am going to go back to just build the dashboard_tactics version for now and hopefully get that fixed.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

Dave, see this post #487 (comment)
getting opencpn.log errors for missing create_pi. There is a summary report in that post.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

On line 47 CmakeLists.txt have set back to "ON" to build the dashboard_tactics plugin

# ON = performance instruments, 
# OFF = exclude all tactics_pi originated code from compilation _and_ build
SET(TACTICS_INSTRUMENTS ON)

I will get this working first. This other problem is a side track.

@bdbcat
Copy link
Member

bdbcat commented Nov 7, 2021

Rick...
Please slow down
What happened to this error?
12:12:21.625 ERROR dynlib.cpp:120 Couldn't find symbol 'create_pi' in a dynamic library (error 127: The specified procedure could not be found.)

If you have this error, you could not possibly be getting to this:
...the Preferences button is not working in the PIM plugin window and when the plugin is enabled the toolbar icon does not show so the plugin does not work and is inaccessible if it is working.

So, please stop trying random things, and lets fix one thing at a time.

"I am building in Windows, using VS2017"
I mean exactly how. What keystrokes, etc.

Why do you care about building without tactics? Will this be published?

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

Just tried it again, with same results, no preferences and no icon in toolbar
opencpn.log
.

@bdbcat
Copy link
Member

bdbcat commented Nov 7, 2021

Did you rebuild? How did you install? Import?

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

I always remove all files from the build directory. Then rebuild it from the command line using a bash prompt with the command ./bld.bat which runs this batch file

cd build
cmake -T v141_xp ..
cmake --build . --target package --config release >output.txt
bash ./cloudsmith-upload.sh

Then I install it from the PIM "Import" button.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

Maybe I should just expand the tarball somehow?

@bdbcat
Copy link
Member

bdbcat commented Nov 7, 2021

Rick...
Do you know about Anydesk?
This is an app that would let me attach to your computer, and watch the process, interacting as desired. Hakan and I use it very effectively.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

I know logmein etc. I will try to find Anydesk, something to install?

@bdbcat
Copy link
Member

bdbcat commented Nov 7, 2021

It is an app that you install.
https://anydesk.com/en

After you install, you give me an key to login to your system. We will then share the desktop, we can chat, etc.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

sent via email

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

Have a srceen saying desk accessed with...

@bdbcat
Copy link
Member

bdbcat commented Nov 7, 2021

Please restart Anydesk as Administrator.
I see your screen, but cannot use mouse or keyboard.

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

Dave, that was too bad. maybe next time.
I have cleaned out opencpn.log and installed current build
which will be found on cloudsmith alph repository here https://cloudsmith.io/~opencpn/repos/dashboardtactics-alpha/packages/
after I push the version up dashboard_tactics_pi-1.6.6.27-msvc-x86_64-10.0.19042.tar.gz

Here is the log after installation and trying to enable it and use it.
opencpn.log

15:32:22.368 MESSAGE pluginmanager.cpp:1149 Checking plugin candidate: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboardtactics_pi.dll
15:32:22.368 MESSAGE pluginmanager.cpp:2195 Plugin is compatible: true
15:32:22.368 MESSAGE pluginmanager.cpp:2284 PlugInManager: Loading PlugIn: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboardtactics_pi.dll
15:32:22.368   ERROR dynlib.cpp:120 Couldn't find symbol 'create_pi' in a dynamic library (error 127: The specified procedure could not be found.)
15:32:22.368 MESSAGE pluginmanager.cpp:2363    PlugInManager: Cannot load symbol create_pi: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboardtactics_pi.dll
15:32:22.368 MESSAGE pluginmanager.cpp:1149 Checking plugin candidate: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboard_tactics_pi.dll
15:32:22.368 MESSAGE pluginmanager.cpp:1200 Skipping not enabled candidate.
15:32:22.368 MESSAGE pluginmanager.cpp:1149 Checking plugin candidate: C:\Users\fcgle\AppData\Local\opencpn\plugins\findit_pi.dll

Then later

15:32:28.464 MESSAGE pluginmanager.cpp:2284 PlugInManager: Loading PlugIn: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboardtactics_pi.dll
15:32:28.464   ERROR dynlib.cpp:120 Couldn't find symbol 'create_pi' in a dynamic library (error 127: The specified procedure could not be found.)
15:32:28.464 MESSAGE pluginmanager.cpp:2363    PlugInManager: Cannot load symbol create_pi: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboardtactics_pi.dll
15:32:28.464 MESSAGE pluginmanager.cpp:1149 Checking plugin candidate: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboard_tactics_pi.dll
15:32:28.464 MESSAGE pluginmanager.cpp:2195 Plugin is compatible: true
15:32:28.464 MESSAGE pluginmanager.cpp:2284 PlugInManager: Loading PlugIn: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboard_tactics_pi.dll
15:32:28.464   ERROR dynlib.cpp:120 Couldn't find symbol 'create_pi' in a dynamic library (error 127: The specified procedure could not be found.)
15:32:28.464 MESSAGE pluginmanager.cpp:2363    PlugInManager: Cannot load symbol create_pi: C:\Users\fcgle\AppData\Local\opencpn\plugins\dashboard_tactics_pi.dll

@jongough
Copy link
Contributor

jongough commented Nov 7, 2021

I have just built the mnt151-frontend2 of this using circleci local

clear; circleci local execute --job build-focal-gtk3 -e CIRCLECI_LOCAL=true -e CLOUDSMITH_API_KEY="123" --volume /home/jon/opencpn/circleci-output:/home/circleci/circleci-output -e LOCAL_DEPLOY=true

and have then run OCPN 5.5.928 on Linux Mint 20.2

LSB Version:    core-11.1.0ubuntu2-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Linuxmint
Description:    Linux Mint 20.2
Release:        20.2
Codename:       uma

And the icons and preferences seem to work OK with both OpenGL and without. Is it only windows that is showing the issue?

@rgleason
Copy link
Contributor Author

rgleason commented Nov 7, 2021

Thanks Jon, The problem was that I had not cleared out plugins in my O configuration that were with the wrong commonname!!! Dave showed me just a little while earlier. I have built and depoyed to cloudsmith and will push to PIM

@rgleason
Copy link
Contributor Author

This is one to remember for sure! Clear out those plugins if you are having troubles you can't identify!

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

3 participants