Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 18-05-2014, 10:50   #16
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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, 24 views)
__________________

__________________
rgleason is offline   Reply With Quote
Old 18-05-2014, 11:13   #17
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
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, 16:34   #18
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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, 16:46   #19
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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, 16:49   #20
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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, 17:05   #21
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
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, 18:49   #22
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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, 32 views)
__________________
rgleason is offline   Reply With Quote
Old 18-05-2014, 22:42   #23
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 2,824
Re: Opencpn Beta 3.3.1713

Rick,

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

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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, 05:05   #25
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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, 05:11   #26
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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, 05:54   #27
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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, 06:18   #28
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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, 07:18   #29
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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, 07:39   #30
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,421
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

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



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 02:46.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.