Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 18-05-2014, 09:50   #16
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Opencpn Beta 3.3.1713

git checkout opencpn-3.2.0
git branch -v shows it is not a real branch
git checkout -b opencpn-3.2.0 [new branch name] to make the branch.
git checkout -b opencpn-3.2.0
opencpn-3.2.0 <--- executed

now setup for 3.2.0

cd build
cmake ..
cmake --build .

Then MSVC++ Build > Build Solution
Then MSVC++ Debug

Immediate Break Error with
Unhandled exception at 0x0116549d in opencpn.exe: 0xC0000005: Access violation reading location 0x000000dc.

See attached. No log info.
What is wrong? wxWidgets? MSVC? Missing some file?
This seems to happen only with Debug mode. Something to do with Debug? Even with earlier versions that used to compile and run.
Attached Files
File Type: doc Opencpn 3.2.0 Output-Immediate Break.doc (7.1 KB, 55 views)
rgleason is offline   Reply With Quote
Old 18-05-2014, 10:13   #17
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Opencpn Beta 3.3.1713

Rick...
It looks like you simply screwed your environment. Clean your table well to make absolutely sure you are not mixing Debug with Release, mingw with native MSVC etc. and you should be OK once again.

Pavel
nohal is offline   Reply With Quote
Old 18-05-2014, 15:34   #18
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Opencpn Beta 3.3.1713

Thank you Pavel, I looked up msvc clean table and found this link which partly answers some questions about

A. "clean table"
Visual Studio 2010 - C++ project - remove *.sdf file - Stack Overflow
Denis Kochnev: Use Visual Studio 2010 Ultimate for Data Generation - Tips and Tricks

I am favoring this method right now:
Rory Primrose | Cleaning a VS2010 solution with a sledgehammer

Generating SQL Server Test Data with Visual Studio 2010


B. Generating a Package as Sean suggested earlier.
..Cmake also generates a 'package' and 'install' target, perhaps you can specify those with the --target option with cmake --build. cmake --build my_build_dir --target install
http://stackoverflow.com/questions/6...for-msvc-build
rgleason is offline   Reply With Quote
Old 18-05-2014, 15:46   #19
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Opencpn Beta 3.3.1713

Found this useful for Clean Tables
Visual Studio (2008) &#39;Clean Solution&#39; Option - Stack Overflow

In MSVC++ Visual Studio 2010
Pick highlight a Class like ALL_BUILD and pick Build Clean ALL-Build
Then highlight the next class and pick Build Clean [that class]
etc
All the way down the list.
===
OR
Just pick Build > Clean Solution

Then pick Build > Rebuild Solution
rgleason is offline   Reply With Quote
Old 18-05-2014, 15:49   #20
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Opencpn Beta 3.3.1713

Still get immediate break

Unhandled exception at 0x004b549d in opencpn.exe: 0xC0000005: Access violation reading location 0x000000dc.
rgleason is offline   Reply With Quote
Old 18-05-2014, 16:05   #21
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Opencpn Beta 3.3.1713

Rick...
By clean table I meant that you have all the components in a state described in the build documentation - the right version of WX built the right way, not mixed with Sean's WX built with mingw, the clean OpenCPN sources, not mixed between X branches and with binary plugins of several origins copied manually all over the place. It's very unlikely that you managed to break VisualStudio itself...

Pavel
nohal is offline   Reply With Quote
Old 18-05-2014, 17:49   #22
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Opencpn Beta 3.3.1713

Tried Build > Clean Solution then Build>Rebuild Solution
and it still failed.

So,
Build > Clean Solution
Close VC 2010
cmake .. then cmake --build .
Open VS 2010
Pick the project, it reloads.
Build > Rebuild Solution (see output)
Debug

Result: Immediate Break - Unhandled exception at 0x0145549d in opencpn.exe: 0xC0000005: Access violation reading location 0x000000dc.


Attached Files
File Type: doc Opencpn 3.2.0 build-build solution.doc (22.6 KB, 53 views)
rgleason is offline   Reply With Quote
Old 18-05-2014, 21:42   #23
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Opencpn Beta 3.3.1713

Rick,

You are probably mixing dll files in the wrong way. Exactly how I cannot tell.
seandepagnier is offline   Reply With Quote
Old 19-05-2014, 02:39   #24
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Opencpn Beta 3.3.1713

I have been executing the cmake --build . and then the cmake --build . --config release command so that I could copy the release binaries to use without debug. Maybe that is the problem? I can only do one thing at a time? Or perhaps the dashboard and grib dll are not a compatible api? Those are the only things I can think of to check because my widgets is the same and I have not yet tried mingw which I was going to try next after I sorted this out. I have to admit to be a little sloppy about running various versions of release out of my binary opencpn because I often have successive opencpn33xxxx.exe.doc in main dir and just rename the file. But I don't do this in my compile directories which are opencpn- git (beta) and opencpn - opt (optimized). Perhaps when I git checkout a previous version like opencpn-3.2.0 I should also delete entire build dir and then my dir build? I'll try all of these next. Thanks Sean and Pavel.

Sent from my SCH-I545 using Cruisers Sailing Forum mobile app
rgleason is offline   Reply With Quote
Old 19-05-2014, 04:05   #25
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Opencpn Beta 3.3.1713

It works now! -needed to
1. Delete build directory and make a new build directory
2. Add uidata folder and gshhs folder to build directory
3. Rerun cmake --build . and VS 2010 Build > Build Solution

Summary to Checkout Version 3.2.0 (for example)
===============================
git checkout opencpn-3.2.0
git branch -v shows it is not a real branch
git checkout -b opencpn-3.2.0 [new branch name] to make the branch.
git checkout -b opencpn-3.2.0
opencpn-3.2.0 <--- executed

now setup for 3.2.0
rmdir build <----Should have done this!!

cd build
cmake ..
cmake --build .

Copy uidata into Build directory <------Should have done this for User Interface symbols!
Copy gshhs into Build directory <------Should have done this for Outline world map.
Then MSVC++ Build > Build Solution
Then MSVC++ Debug
and it works now.
rgleason is offline   Reply With Quote
Old 19-05-2014, 04:11   #26
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Opencpn Beta 3.3.1713

Works now.
1. Delete Build Folder
2. Mkdir Build
3. Copy gshhs outline maps folder to Build
4. Copy uidata folder to Build
3. run cmake and VS 2010 Build > Build Solutions
and it works.

Revised Summary for checkout of previous version of Opencpn
=======================================
git checkout opencpn-3.2.0
git branch -v shows it is not a real branch
git checkout -b opencpn-3.2.0 [new branch name] to make the branch.
git checkout -b opencpn-3.2.0
opencpn-3.2.0 <--- executed

now setup for 3.2.0

rmdir build
mkdir build
copy uidata into ../build
copy gshhs maps into ../buid
cd build
cmake ..
cmake --build .

Then MSVC++ Build > Build Solution
Then MSVC++ Debug
rgleason is offline   Reply With Quote
Old 19-05-2014, 04:54   #27
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Opencpn Beta 3.3.1713

MS Visual Studio 2010 >Debug
This Immediate break error:
Unhandled exception at 0x0035e4ed in opencpn.exe: 0xC0000005: Access violation reading location 0x000000dc.
with styles.h file at {}ocpnStyle and line reading
Quote:
WX_DECLARE_STRING_HASH_MAP( int, intHash );
probably means you have not copied the "uidata" folder into the ../build directory.

In Debug If there are no continent outlines when the chart opens, copy the gshhs folder into the ../build directory.
rgleason is offline   Reply With Quote
Old 19-05-2014, 05:18   #28
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Opencpn Beta 3.3.1713

Checkout of most current Beta version
(Change the Debug version back to most current beta)
=============================
cd opencpn-git
git branch -v
master 161ae3a [behind 18] set opengl texture compressions to off
* opencpn-3.2.0 cf69568 3.2.0
git stash <--- to store local changes,(if you are not a programmer only so you can checkout the master branch)
git checkout master
git branch -v
* master 161ae3a [behind 18] set opengl texture compressions to off
opencpn-3.2.0 cf69568 3.2.0
git fetch
downloads some of the 18 behind, but still shows more similar to above
git pull [overwrites and pulls down all the master files, provided you have not made changes]
git branch -v
* master 82ecabacb Add dashboard instrument showing distance and bearing between ship and cursor
opencpn-3.2.0 cf69568 3.2.0

Now setup for running most current Opencpn Beta version [3.3.1715 for example]
All you should normally need to do is:
cd opencpn-git
rmdir build
mkdir build
copy uidata into ../build
copy gshhs maps into ../build
cd build
cmake ..
cmake --build .

Then MSVC++ Build > Build Solution
Then MSVC++ Debug

Then to build the release version
cmake --build . --config release

This Immediate break error:
Unhandled exception at 0x0035e4ed in opencpn.exe: 0xC0000005: Access violation reading location 0x000000dc.
with styles.h file at {}ocpnStyle and line reading
Quote: WX_DECLARE_STRING_HASH_MAP( int, intHash );
probably means you have not copied the "uidata" folder into the ../build directory.

In Debug If there are no continent outlines when the chart opens, copy the gshhs folder into the ../build directory.

When MS Visual Studio 2010, Opencpn Debug is working,
Copy the recently compiled Debug version of the plugins Dashboard_pi and Grib_pi to the correct folder.
from the directory path:

copy C:\..\opencpn-git2\build\plugins\dashboard_pi\Debug the file "dashboard_pi.dll" to ..\build\plugins
copy C:\..\opencpn-git2\build\plugins\grib_pi\Debug "grib_pi.dll" to ..\build\plugins

=====
Now it works.
DON'T FORGET TO DELETE THE "BUILD" directory and then make it!
Make sure you have copied the uidata folder and gshhs folders from another installation.
After Debug is working, copy the same version debug dlls to the ../build/plugins folder.
rgleason is offline   Reply With Quote
Old 19-05-2014, 06:18   #29
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Opencpn Beta 3.3.1713

Pavel has process all mapped out here
Compiling - Windows | Official OpenCPN Homepage

Sean's Optimized is now working after deleting the "Build" directory and mkdir build, then cmake...

Question: My git config file shows
url = git://github.com/seandepagnier/OpenCPN
is this the mingw version?
because it compiles & runs debug with MS Visual Studio 2010 (when done properly
rgleason is offline   Reply With Quote
Old 19-05-2014, 06:39   #30
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Opencpn Beta 3.3.1713

Since correcting every error possible, I'd like to figure out how to make a "package" now, as Sean requested earlier. I happened to find this in the Opencpn documentation

NSIS (Unicode) -Needed only in case you intend to build the installation package for OpenCPN. Compiling - Windows | Official OpenCPN Homepage

So now I have the instructions and should be able to "package" the standalone plugins Sean has prepared.
rgleason is offline   Reply With Quote
Reply

Tags
enc, opencpn


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
OpenCPN Version 2.2 Beta Test bdbcat OpenCPN 437 15-12-2010 19:17
OpenCPN Version 2.2 Beta Test Bugs / Discussion bdbcat OpenCPN 120 26-09-2010 02:53
OpenCPN Version 2.1.0 Beta bdbcat OpenCPN 1045 25-06-2010 10:09
OpenCPN Version 1.3.5 Beta Technical bdbcat OpenCPN 544 24-03-2010 10:34

Advertise Here


All times are GMT -7. The time now is 07:01.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.