seandepagnier / celestial_navigation_pi

celestial navigation plugin for opencpn
17 stars 21 forks source link

Debug w/MSVC++ fails and Release bombs Opencpn v4.8.0 #18

Closed rgleason closed 7 years ago

rgleason commented 7 years ago

Cloned and recompiled Master Branch for both debug and release. Both compiled fine, no errors. Installed into v4.8.0 and Cel_Nav crashed Opencpn as soon as the PI button was pushed.

Copied data and dll to Opencpn/build/plugins and tried running MSVC++ and using Cel_nav. It seemed to fail, but all I have is an output file (attached). cel_nav-Output.txt

I'll try to get better info somehow..

rgleason commented 7 years ago

git checkout ebe6ab903
Merge pull request #9 from PovlAbrahamsen/master https://github.com/seandepagnier/celestial_navigation_pi/commit/ebe6ab903000e025c1dfdd1160f14dac6c2ee164

and tried compiling that and both debug and release compiled again. Release bombed Opencpn and Debug MSVC ran a lot and created heat and this Output file, but the instance of Opencpn disappeared.

cel-nav-output-head- ebe6ab903.txt

I am afraid this is not going to help...

rgleason commented 7 years ago

Then tried download of https://github.com/PovlAbrahamsen/celestial_navigation_pi and made debug and release. of Master branch These did compile same as the others, but the action was the same too. Release version would bomb out Opencpn. See the log file attached please. opncpn-LOG.txt

rgleason commented 7 years ago

PovlAbrahamsen - Fixed bug when reloading Sight XML

Line 211 in CelestialNavigationDialog.cpp s.m_BodyLimb = (Sight::BodyLimb)AttributeInt(e, "BodyLimb", 0); is there.

Povl- Added corrections for stars

...I've checked all the changes as Povl wrote them and as they appear in sean's current repos, and they all appear to be there... but I found this note on Line 242 - 244 in celestial_navigation_pi.cpp and I don't know what it means.

elif defined(WXOSX)

wxString stdPath  = (std_path.GetUserConfigDir() + s + _T("opencpn"));   // should be ~/Library/Preferences/opencpn

endif

rgleason commented 7 years ago

QUESTION: DOES THIS RUN IN LINUX OK? If so it is some windows bug which might kind of narrow things down.

rgleason commented 7 years ago

Please Note: I have compiled celestial_navigation_pi using opencpn.lib (v4.8.0 Debug version). I copied MSVC++Debug version Opencpn\build\debug\opencpn.lib into Celestial_Navigation_pi\build\ Then copied the compiled debug version of Celestial_Navigation_pi.dll from Celestial_Navigation_pi\build\debug\celestial_navigation_pi to Opencpn\build\plugins\celestial_navigation_pi.dll along with the celestial_navigation_pi\data directory. Cel-Nav-More-output.zip

rgleason commented 7 years ago

I think it seems to be having trouble reading the data files, so I tried moving the data up one directory to opencpn\build\plugins\celestial_navigation_pi but that does not improve anything...

rgleason commented 7 years ago

How do you limit a breakpoint to just the Plugin? How do you set sensible breakpoints? What kinds of calls should be used?

stelian42 commented 7 years ago

Googling for the error message in your log led me to this: http://wxpython-users.1045709.n5.nabble.com/wx-FileConfig-error-when-INI-file-has-duplicate-section-names-td5727364.html

rgleason commented 7 years ago

Stelian Thankyou. I'll look for this... I've tried renaming opencpn.ini to opencpn.ini.last and then starting the program and when I select the Cel_Nav icon, Opencpn "Stops responding" so I guess it is not that ini file.

rgleason commented 7 years ago

All of these fail instantly when the Cel_Nav Icon is selected (using Opencpn v4.8.0

celestial_navigation_pi- Versionbump-Star-Correction-d6551e7-win32.exe

celestial_navigation_pi-Povl-Abranamsen-MergePR9-ebe6ab9-win32.exe

celestial_navigation_pi-2.0-win32.exe downloaded from https://opencpn.org/OpenCPN/plugins/celestialnav.html

rgleason commented 7 years ago

Here are a number of tests stepping through the various commits and merges

C:\Users\Rick\Documents\GitHub\o-plugin\s-celestial_navigation_pi\build>git branch -va

9:47:53 PM: PlugInManager searching for PlugIns in location C:\Program Files (x86)\OpenCPN 4.8.0\plugins 9:47:53 PM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\celestial_navigation_pi.dll 9:47:53 PM: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\celestial_navigation_pi.dll API Version detected: 108 PlugIn Version detected: 200 9:47:53 PM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\climatology_pi.dll 9:47:53 PM: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\climatology_pi.dll API Version detected: 109 PlugIn Version detected: 102

9:47:53 PM: Loading catalog for: opencpn-chartdldr_pi 9:47:53 PM: Loading catalog for: opencpn-wmm_pi 9:47:53 PM: Loading catalog for opencpn core. 9:47:53 PM: Getting DefaultSystemLocale... 9:47:53 PM: Found LanguageInfo for: English 9:48:00 PM: PlugInManager: Initializing PlugIn: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\celestial_navigation_pi.dll

Instant failure...

===============

C:\Users\Rick\Documents\GitHub\o-plugin\s-celestial_navigation_pi\build>git branch -va

9:56:49 PM: Getting DefaultSystemLocale... 9:56:49 PM: Found LanguageInfo for: English 9:56:58 PM: PlugInManager: Initializing PlugIn: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\celestial_navigation_pi.dll 9:57:00 PM: Metrics: m_display_size_mm: 344 wxDisplaySize: 1920:1080
9:57:01 PM: Metrics: m_display_size_mm: 344 wxDisplaySize: 1920:1080

Failed when clicked on Cel_Nav Icon

==================

C:\Users\Rick\Documents\GitHub\o-plugin\s-celestial_navigation_pi>git branch -va

10:06:01 PM: PlugInManager searching for PlugIns in location C:\Program Files (x86)\OpenCPN 4.8.0\plugins 10:06:01 PM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\celestial_navigation_pi.dll 10:06:01 PM: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\celestial_navigation_pi.dll API Version detected: 108 PlugIn Version detected: 201 10:06:01 PM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\chartdldr_pi.dll 10:06:01 PM: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\chartdldr_pi.dll API Version detected: 113 PlugIn Version detected: 102

10:06:01 PM: Opencpn language load for: en_US 10:06:01 PM: Loading catalog for: opencpn-celestial_navigation_pi 10:06:01 PM: Loading catalog for: opencpn-chartdldr_pi 10:06:01 PM: Loading catalog for: opencpn-wmm_pi 10:06:01 PM: Loading catalog for opencpn core. 10:06:01 PM: Getting DefaultSystemLocale... 10:06:01 PM: Found LanguageInfo for: English 10:06:03 PM: ***GPS Watchdog timeout at Lat:33.358 Lon: -79.282

Failed when click on Cel_Nav Icon

========================

C:\Users\Rick\Documents\GitHub\o-plugin\s-celestial_navigation_pi>git branch -va

Opencpn 4.2 10:15:29 PM: PlugInManager searching for PlugIns in location C:\Program Files (x86)\OpenCPN 4.8.0\plugins 10:15:29 PM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\celestial_navigation_pi.dll 10:15:29 PM: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\celestial_navigation_pi.dll API Version detected: 108 PlugIn Version detected: 201 10:15:29 PM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\chartdldr_pi.dll 10:15:29 PM: C:\Program Files (x86)\OpenCPN 4.8.0\plugins\chartdldr_pi.dll API Version detected: 113 PlugIn Version detected: 102

10:15:29 PM: Opencpn language load for: en_US 10:15:29 PM: Loading catalog for: opencpn-celestial_navigation_pi 10:15:29 PM: Loading catalog for: opencpn-chartdldr_pi 10:15:29 PM: Loading catalog for: opencpn-wmm_pi 10:15:29 PM: Loading catalog for opencpn core. 10:15:29 PM: Getting DefaultSystemLocale... 10:15:29 PM: Found LanguageInfo for: English 10:15:31 PM: ***GPS Watchdog timeout at Lat:33.358 Lon: -79.282

oPENCPN BOMBED WHEN SELECTED cEL_NAV Icon

========================

C:\Users\Rick\Documents\GitHub\o-plugin\s-celestial_navigation_pi>git branch -va

10:18:31 PM: Opencpn language load for: en_US 10:18:31 PM: Loading catalog for: opencpn-celestial_navigation_pi 10:18:31 PM: Loading catalog for: opencpn-chartdldr_pi 10:18:31 PM: Loading catalog for: opencpn-wmm_pi 10:18:31 PM: Loading catalog for opencpn core. 10:18:31 PM: Getting DefaultSystemLocale... 10:18:31 PM: Found LanguageInfo for: English 10:18:32 PM: ***GPS Watchdog timeout at Lat:33.358 Lon: -79.282

OpenCPN bombed when select Icon.

rgleason commented 7 years ago

The above was done to find a previous version which worked, so that I could make a diff to help with fixing the problem. I was unsuccessful at finding a version that would work.

Tried back to: https://github.com/seandepagnier/celestial_navigation_pi/commit/9551c1f02dd03b37eb0fd3abdfc140f6c83ee336 version 2.0 major improvements to UI master d6551e7 version bump for star correction

Up to: Merge pull request #9 from PovlAbrahamsen/master master d6551e7 version bump for star correction

stelian42 commented 7 years ago

This can be closed now, is fixed in main tree.

rgleason commented 7 years ago

Stelian, Thank you. IMHO this has not been "Miscellaneous Fixes". I will close when the PR is Merged.

rgleason commented 7 years ago

Closing as the error is fixed, but there is an outstanding PR by Stelian to fix other things and give notice when the sights file is corrupted.