Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 04-03-2019, 09:18   #1
Registered User

Join Date: Jan 2018
Boat: Norseman 447cc
Posts: 117
Help debugging plugin crash with Xcode

I have managed to get OpenCPN to compile and run properly using Xcode after sorting out the wxWidgets build. I am trying to track down the cause of a bug that is causing OpenCPN beta to crash when trying to use SailDocs to fetch GRIB data but when I run OpenCPN using Xcode to build I have no plugins listed. I can load charts and do everything else and I see the default plugins are properly built in the build tree and when I install the compiled code all of the plugins are there but I can't seem to get it to work in an Xcode environment. Is there anything special I need to do to get that working?


Also, how can I go about submitting some changes to the documentation for compiling on Mac? There are some not so obvious, at least to me, things that needed to be done to get the wxWidgets code to build properly and I'd like to contribute those steps.
__________________

svspirited is offline   Reply With Quote
Old 04-03-2019, 09:40   #2
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 3,532
Re: Help debugging plugin crash with Xcode

What are you missing from the standard macOS crash report (when running one of the beta builds)? The one "OpenCPN crashed, would you like to inform or retry". "Inform" ....

Even when the crash happens in a plug-in, the back-trace is quite complete most of the time.

But perhaps you did already know all this. Then sorry.

Hubert
__________________

bcn is offline   Reply With Quote
Old 04-03-2019, 09:46   #3
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,226
Re: Help debugging plugin crash with Xcode

Quote:
Originally Posted by svspirited View Post
I have managed to get OpenCPN to compile and run properly using Xcode after sorting out the wxWidgets build. I am trying to track down the cause of a bug that is causing OpenCPN beta to crash when trying to use SailDocs to fetch GRIB data but when I run OpenCPN using Xcode to build I have no plugins listed. I can load charts and do everything else and I see the default plugins are properly built in the build tree and when I install the compiled code all of the plugins are there but I can't seem to get it to work in an Xcode environment. Is there anything special I need to do to get that working?


Also, how can I go about submitting some changes to the documentation for compiling on Mac? There are some not so obvious, at least to me, things that needed to be done to get the wxWidgets code to build properly and I'd like to contribute those steps.
Like this
Code:
nohalombp:OpenCPN nohal$ cd build
nohalombp:build nohal$ mkdir -p Debug/OpenCPN.app/Contents/PlugIns
nohalombp:build nohal$ cp plugins/grib_pi/Debug/libgrib_pi.dylib Debug/OpenCPN.app/Contents/PlugIns/
or by modifying https://github.com/OpenCPN/OpenCPN/b...art1.cpp#L6694 to load the plugin from <YOUR_BUILD_DIR>/plugins/grib_pi/Debug - better if you plan to modify the source a lot.

Regarding the build documentation you may post the changes you consider necessary here, I will review and apply them as needed.

Pavel
nohal is offline   Reply With Quote
Old 04-03-2019, 12:30   #4
Registered User

Join Date: Jan 2010
Location: Harlingen, NL
Boat: KMY Stadtship 56
Posts: 290
Re: Help debugging plugin crash with Xcode

I always create a symlink from the PlugIns directory to the build plugins directory:

ls -l Debug/OpenCPN.app/Contents/PlugIns
lrwxrwxrwx 1 kees staff 58 Feb 5 20:06 Debug/OpenCPN.app/Contents/PlugIns -> /Users/kees/git/OpenCPN/build-mac-xcode/plugins/
merrimac is offline   Reply With Quote
Old 04-03-2019, 18:38   #5
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 5,653
Re: Help debugging plugin crash with Xcode

merrimac...


If you can build and run the core in XCode, then simply single-step through the code in pluginmanager.cpp that tries to load the plugins. Should be clear enough to figure out why it he not finding your target plugin, or if found, then failing to load it.


Dave
bdbcat is offline   Reply With Quote
Old 05-03-2019, 07:03   #6
Registered User

Join Date: Jan 2018
Boat: Norseman 447cc
Posts: 117
Re: Help debugging plugin crash with Xcode

Thanks for the replies, I managed to get that all up and running and I can see where it is crashing now. Details updated in the tracker and I changed it to the GRIB project.



Pavel, I'll get you the documentation updates that I wanted to make later.
__________________

svspirited is offline   Reply With Quote
Reply

Tags
plug

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Development Debugging Environment - Setup Help rgleason OpenCPN 611 29-09-2019 05:59
Datamarine Masthead Unit debugging chris95040 Marine Electronics 3 17-09-2017 06:43
Debugging OCPN Connections RobbieW OpenCPN 45 16-07-2015 04:37
Static builds, plugins and debugging under MSW... evendine OpenCPN 2 02-04-2015 19:17
Anyone know about debugging a flaky tach? Paul L Engines and Propulsion Systems 2 31-07-2005 05:15

Advertise Here


Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 05:37.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
×

ShowCase vBulletin Plugins by Drive Thru Online, Inc.