*** Error in `node': munmap_chunk(): invalid pointer: 0x00007f9b5240f720 ***
node(_ZNSt10_HashtableIiiSaIiENSt8__detail9_IdentityESt8equal_toIiESt4hashIiENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE21_M_insert_unique_nodeEmmPNS1_10_Hash_nodeIiLb0EEE+0x128)[0xa7b6c8] 5.53323***C++ output***aftersolvetspafterresize/~/or-tools/ubuntu-16.04/lib/libortools.so(_ZN19operations_research12PathOperator20InitializePathStartsEv+0x746)[0x7f9b53472f46]after put in arraybefore deleteafterdeleter/~/or-tools/ubuntu-16.04/lib/libortools.so(_ZN19operations_research12PathOperator19InitializeBaseNodesEv+0x1e)[0x7f9b5347319e]The order in the first calculation is: 0,2,1,3/~/or-tools/ubuntu-16.04/lib/libortools.so(_ZN19operations_research12PathOperator7OnStartEv+0x9)[0x7f9b534733b9]/~/or-tools/ubuntu-16.04/lib/libortools.so(_ZN19operations_research22VarLocalSearchOperatorINS_6IntVarExNS_24IntVarLocalSearchHandlerEE5StartEPKNS_10AssignmentE+0x203)[0x7f9b5347c833]/~/or-tools/ubuntu-16.04/lib/libortools.so(+0x83e266)[0x7f9b53460266]/~/or-tools/ubuntu-16.04/lib/libortools.so(+0x83e222)[0x7f9b53460222]/~/or-tools/ubuntu-16.04/lib/libortools.so(_ZN19operations_research15FindOneNeighbor4NextEPNS_6SolverE+0x235)[0x7f9b53471a95]/~/or-tools/ubuntu-16.04/lib/libortools.so(_ZN19operations_research6Solver12NextSolutionEv+0x235)[0x7f9b533912f5]/~/or-tools/ubuntu-16.04/lib/libortools.so(_ZN19operations_research6Solver14SolveAndCommitEPNS_15DecisionBuilderERKSt6vectorIPNS_13SearchMonitorESaIS5_EE+0x2f)[0x7f9b5339259f]/~/or-tools/ubuntu-16.04/lib/libortools.so(+0x83db0b)[0x7f9b5345fb0b]/~/or-tools/ubuntu-16.04/lib/libortools.so(_ZN19operations_research6Solver12NextSolutionEv+0x3ae)[0x7f9b5339146e]/~/or-tools/ubuntu-16.04/lib/libortools.so(_ZN19operations_research6Solver5SolveEPNS_15DecisionBuilderERKSt6vectorIPNS_13SearchMonitorESaIS5_EE+0x28)[0x7f9b533919a8]/~/or-tools/ubuntu-16.04/lib/libortools.so(_ZN19operations_research12RoutingModel33SolveFromAssignmentWithParametersEPKNS_10AssignmentERKNS_23RoutingSearchParametersE+0x206)[0x7f9b534d7d66]/~/build/Debug/module.node(_ZN19operations_research3Tsp8SolveTspEv+0x17f)[0x7f9b604ea843]/~/build/Debug/module.node(_Z7ExecuteP10napi_env__Pv+0xbb)[0x7f9b604e84ab]node[0x1408461]/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f9b62b076ba]/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f9b6283741d]
==5065== Thread 7:==5065== Invalid free() / delete / delete[] / realloc()==5065== at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)==5065== by 0xA7B6C7: std::_Hashtable<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<int, false>*) (in /usr/bin/node)==5065== by 0xA333F45: operations_research::PathOperator::InitializePathStarts() (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0xA33419D: operations_research::PathOperator::InitializeBaseNodes() (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0xA3343B8: operations_research::PathOperator::OnStart() (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0xA33D832: operations_research::VarLocalSearchOperator<operations_research::IntVar, long long, operations_research::IntVarLocalSearchHandler>::Start(operations_research::Assignment const*) (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0xA321265: operations_research::(anonymous namespace)::CompoundOperator::MakeNextNeighbor(operations_research::Assignment*, operations_research::Assignment*) (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0xA321221: operations_research::(anonymous namespace)::CompoundOperator::MakeNextNeighbor(operations_research::Assignment*, operations_research::Assignment*) (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0xA332A94: operations_research::FindOneNeighbor::Next(operations_research::Solver*) (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0xA2522F4: operations_research::Solver::NextSolution() (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0xA25359E: operations_research::Solver::SolveAndCommit(operations_research::DecisionBuilder*, std::vector<operations_research::SearchMonitor*, std::allocator<operations_research::SearchMonitor*> > const&) (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0xA320B0A: operations_research::(anonymous namespace)::NestedSolveDecision::Apply(operations_research::Solver*) (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0xA25246D: operations_research::Solver::NextSolution() (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0xA2529A7: operations_research::Solver::Solve(operations_research::DecisionBuilder*, std::vector<operations_research::SearchMonitor*, std::allocator<operations_research::SearchMonitor*> > const&) (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0xA398D65: operations_research::RoutingModel::SolveFromAssignmentWithParameters(operations_research::Assignment const*, operations_research::RoutingSearchParameters const&) (in /home/jim/docs/platform/modules/tsp/or-tools/ubuntu-16.04/lib/libortools.so)==5065== by 0x98DD842: operations_research::Tsp::SolveTsp() (module_tsp.cc:102)==5065== by 0x98DB4AA: Execute(napi_env__*, void*) (module.cc:43)==5065== by 0x1408460: ??? (in /usr/bin/node)==5065== by 0x5AEE6B9: start_thread (pthread_create.c:333)==5065== by 0x5E0B41C: clone (clone.S:109)==5065== Address 0xb8da720 is on thread 7's stack==5065== in frame #2, created by operations_research::PathOperator::InitializePathStarts() (???:)==5065==
const Assignment* solution = routing.SolveWithParameters(parameters);
const Assignment* solution = routing.Solve();
cout << "Total length test solve " << routing.Solve()->ObjectiveValue() << endl;
Error in `node': munmap_chunk(): invalid pointer: 0x00007f9b5240f720
Invalid free() / delete / delete[] / realloc()
const Assignment* solution = routing.Solve();
std::_Hashtable<int, int, std::allocator<int>
operations_research::PathOperator::InitializePathStarts()operations_research::PathOperator::InitializeBaseNodes() operations_research::PathOperator::OnStart()
operations_research::VarLocalSearchOperator<operations_research::IntVar, long long, operations_research::IntVarLocalSearchHandler>::Start(operations_research::Assignment const*)
operations_research::(anonymous namespace)::CompoundOperator::MakeNextNeighbor(operations_research::Assignment*, operations_research::Assignment*)operations_research::(anonymous namespace)::CompoundOperator::MakeNextNeighbor(operations_research::Assignment*, operations_research::Assignment*)
operations_research::FindOneNeighbor::Next(operations_research::Solver*) operations_research::Solver::NextSolution() operations_research::Solver::SolveAndCommit(operations_research::DecisionBuilder*,
operations_research::(anonymous namespace)::NestedSolveDecision::Apply(operations_research::Solver*)
operations_research::Solver::NextSolution() operations_research::Solver::Solve(operations_research::DecisionBui operations_research::RoutingModel::SolveFromAssignmentWithParameters(operations_research::Assignment const* operations_research::Tsp::SolveTsp()
!!!0[15:52:08] ./ortools/constraint_solver/constraint_solver.h:4948: Check failed: element != nullptrUnknown variable Segmentation fault (core dumped)
const E& Element(const V* const var) const { const E* const element = ElementPtrOrNull(var); DCHECK(element != nullptr) << "Unknown variable " << var->DebugString() << " in solution"; return *element; }
Hi,