Pose2SLAMwSPCG example crashes

Issue #113 new
Chris Beall created an issue
$ ./Pose2SLAMwSPCG 

Factor Graph:
size: 6
factor 0: PriorFactor on 1
  prior mean: (0, 0, 0)
  noise model: diagonal sigmas [0.3; 0.3; 0.1];
factor 1: BetweenFactor(1,2)
  measured: (2, 0, 1.5708)
  noise model: diagonal sigmas [0.2; 0.2; 0.1];
factor 2: BetweenFactor(2,3)
  measured: (2, 0, 1.5708)
  noise model: diagonal sigmas [0.2; 0.2; 0.1];
factor 3: BetweenFactor(3,4)
  measured: (2, 0, 1.5708)
  noise model: diagonal sigmas [0.2; 0.2; 0.1];
factor 4: BetweenFactor(4,5)
  measured: (2, 0, 1.5708)
  noise model: diagonal sigmas [0.2; 0.2; 0.1];
factor 5: BetweenFactor(5,1)
  measured: (0, 0, 0)
  noise model: diagonal sigmas [0.2; 0.2; 0.1];

Initial Estimate:
Values with 5 values:
Value 1: (0.5, 0, 0.2)
Value 2: (2.3, 0.1, 1.1)
Value 3: (2.1, 1.9, 2.8)
Value 4: (-0.3, 2.5, -2.08319)
Value 5: (0.1, -0.7, -0.483185)
Initial error: 130.175
*** Error in `./Pose2SLAMwSPCG': free(): invalid pointer: 0x0000000000a2f640 ***

Comments (6)

  1. Andrew Melim

    I've isolated the error to the following line:

    gtsamDebug.dll!gtsam::DSFBase::find(unsigned __int64 key) Line 47   C++
    gtsamDebug.dll!gtsam::DSFBase::findSet(unsigned __int64 key) Line 57    C++
    **gtsamDebug.dll!gtsam::SubgraphSolver::splitGraph(const gtsam::GaussianFactorGraph & jfg) Line 134 C++**
    gtsamDebug.dll!gtsam::SubgraphSolver::initialize(const gtsam::GaussianFactorGraph & jfg) Line 94    C++
    gtsamDebug.dll!gtsam::SubgraphSolver::SubgraphSolver(const gtsam::GaussianFactorGraph & gfg, const gtsam::SubgraphSolverParameters & parameters, const gtsam::Ordering & ordering) Line 34  C++
    gtsamDebug.dll!gtsam::NonlinearOptimizer::solve(const gtsam::GaussianFactorGraph & gfg, const gtsam::Values & initial, const gtsam::NonlinearOptimizerParams & params) Line 121 C++
    
          const Key u = gf->keys()[0], v = gf->keys()[1],
                      u_root = D.findSet(u), v_root = D.findSet(v);
    
  2. Frank Dellaert

    I suggest running in debug mode. Problem might be well before DSF call. If not, check arguments to DSF and add a unit test in DSF to ascertain correct behavior.

  3. Log in to comment