Strange Crash while Debugging

33 views
Skip to first unread message

Jephunah Smith

unread,
May 5, 2013, 1:04:00 PM5/5/13
to open...@googlegroups.com
I am running into a strange error and I am not sure where to look for the problem.  I am debugging in Visual Studio 2010 Ultimate and installed the Boost libraries via the BoostPro installer for Boost 1.51.

In main.cc under Source Files in the OpenNERO project (which is set as start up) I am getting a crash on the line:
if( !FileExists( "TokenFile" ) )
 
I tried to follow the execution down and found :
return fs::exists(fs::path(filePathName));

This is a call to the Boost filesystem::path function.  The file system library is one of the pre-built ones that the BoostPro installer provides. This call winds up here in path.hpp:
    template <class Source>
    path(Source const& source,
      typename boost::enable_if<path_traits::is_pathable<
        typename boost::decay<Source>::type> >::type* =0)
    {
      path_traits::dispatch(source, m_pathname, codecvt());
    }

This leads to path_traits.hpp and this code:
  template <class U> inline
    void dispatch(const std::string& c, U& to, const codecvt_type& cvt)
  {
    if (c.size())
      convert(&*c.begin(), &*c.begin() + c.size(), to, cvt);
  }

This line results in an error in the part "&*c.begin() + c.size()".  The error occurs in new.cpp inside of the call here:
        while ((p = malloc(size)) == 0)

The specific execution path dips into boost_filesystem-vc100-mt-1_51.dll so I can't figure out what is going on.  The variable size has a value of 12252796 when the error breakpoint occurs.

This all seems to me like something has messed up with the setup of this project on my system.
I am on Windows 7 32bit and installed the "BoostPro 1.51.0 Installer (32-bit) (200K .exe)" off of their site, so I don't know what else to do.

Igor Karpov

unread,
May 5, 2013, 2:19:45 PM5/5/13
to open...@googlegroups.com
Make sure you are starting OpenNERO from the directory that contains all of the stuff copied in from mods/ during the build, including the "TokenFile." In Visual Studio this involves setting the running directory to something like $(TargetDir) if I remember correctly - the exact instructions should be on the site.

--
You received this message because you are subscribed to the Google Groups "opennero" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opennero+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jephunah Smith

unread,
May 5, 2013, 4:56:51 PM5/5/13
to open...@googlegroups.com
Well, I saw that step on the site as well.  I just tried setting the path statically rather than using the macro and still no go.  The issue is before the actual check I think.  The code never makes it into the convert(&*c.begin(), &*c.begin() + c.size(), to, cvt) function.  The crash is happening during the passage of parameters.

Unless I am mistaken about this section of code, the check for whether or not the file "TokenFile" exists doesn't even have a chance to occur.

Thanks

Jephunah Smith

unread,
May 6, 2013, 12:20:03 AM5/6/13
to open...@googlegroups.com
Well, I am at a loss.  I built the boost libraries manually from the latest release 1.53.0.  I got the cmake to run as well as got a successful build in VS2010.  I still am getting that memory error, and in the same spot.

Unless it is some weird issue due to me having installed vs2012 on my machine and then uninstalling it, I have no idea.  I don't even know how I could fix that problem.
Reply all
Reply to author
Forward
0 new messages