<div dir="ltr">The attached code crashes with the following stack trace<div><br></div><div><div>#0 0x00000031c9ebefcb in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /lib64/libstdc++.so.6</div>
<div>#1 0x0000000000454419 in __gnu_cxx::new_allocator<std::string>::construct (this=0x7fff32c8dd10, __p=0x3ea79a0, </div><div> __val=<error reading variable: Cannot access memory at address 0xffffffffffffffe8>) at /usr/include/c++/4.8.2/ext/new_allocator.h:130</div>
<div>#2 0x00000000004530fc in __gnu_cxx::__alloc_traits<std::allocator<std::string> >::construct<std::string> (__a=..., __p=0x3ea79a0, </div><div> __arg=<error reading variable: Cannot access memory at address 0xffffffffffffffe8>) at /usr/include/c++/4.8.2/ext/alloc_traits.h:216</div>
<div>#3 0x0000000000452600 in std::vector<std::string, std::allocator<std::string> >::push_back (this=0x7fff32c8dd10, </div><div> __x=<error reading variable: Cannot access memory at address 0xffffffffffffffe8>) at /usr/include/c++/4.8.2/bits/stl_vector.h:905</div>
<div>#4 0x000000000072843f in ClpPresolve::gutsOfPresolvedModel (this=0x2dbecd0, originalModel=0x285a3a0, feasibilityTolerance=1e-08, keepIntegers=true, numberPasses=5, </div><div> dropNames=false, doRowObjective=false, prohibitedRows=0x0, prohibitedColumns=0x0) at ../../../coin-Cbc/Clp/src/ClpPresolve.cpp:2418</div>
<div>#5 0x000000000072049e in ClpPresolve::presolvedModel (this=0x2dbecd0, si=..., feasibilityTolerance=1e-08, keepIntegers=true, numberPasses=5, dropNames=false, </div><div> doRowObjective=false, prohibitedRows=0x0, prohibitedColumns=0x0) at ../../../coin-Cbc/Clp/src/ClpPresolve.cpp:119</div>
<div>#6 0x000000000069d343 in OsiClpSolverInterface::initialSolve (this=0x2859910) at ../../../../coin-Cbc/Clp/src/OsiClp/OsiClpSolverInterface.cpp:231</div><div>#7 0x000000000062a8ff in CglPreProcess::postProcess (this=0x7fff32c905d0, modelIn=..., deleteStuff=true) at ../../../../coin-Cbc/Cgl/src/CglPreProcess/CglPreProcess.cpp:3862</div>
<div>#8 0x0000000000437bef in CbcMain1 (argc=7, argv=0x7fff32c96980, model=..., callBack=0x41f4aa <dummyCallBack(CbcModel*, int)>, parameterData=...)</div><div> at ../../../coin-Cbc/Cbc/src/CbcSolver.cpp:6648</div>
<div>#9 0x000000000041fe92 in CbcMain1 (argc=7, argv=0x7fff32c96980, model=..., callBack=0x41f4aa <dummyCallBack(CbcModel*, int)>) at ../../../coin-Cbc/Cbc/src/CbcSolver.cpp:1289</div><div>#10 0x000000000041fb90 in CbcMain1 (argc=7, argv=0x7fff32c96980, model=...) at ../../../coin-Cbc/Cbc/src/CbcSolver.cpp:1159</div>
<div>#11 0x00000000004062f8 in main (argc=1, argv=0x7fff32c97c18) at galton11.cpp:295</div></div><div><br></div><div>Removing the #if 0 .. #endif on lines 246 and 249 makes things run well. Turning off preprocessing also works. I suspect that I should have built the model as an OsiClpSolverInterface directly instead of building a ClpSimplex and constructing the OsiClpSolverInterface from that.</div>
<div><br></div></div>