Opened 12 years ago

Closed 12 years ago

#5 closed defect (fixed)

Presolving with no constraints

Reported by: San Owned by: forrest
Priority: major Component: component1
Version: Keywords:
Cc:

Description

When the ClpPresolve? is trying to solve a problem with no constraints, it crashed when it tried to copy the solution across in CoinPresolveMatrix::CoinPresolveMatrix?:

    memcpy(sol_,si->primalColumnSolution(),ncols_*sizeof(double));;

If I read the problem from an LP file, it can solve it normally but if I build the problem on runtime, it crashed.

Here's the stack trace that I got:

 	test.exe!memcpy(unsigned char * dst=0x023b68f8, unsigned char * src=0x00000000, unsigned long count=480)  Line 188	Asm
>	test.exe!CoinPresolveMatrix::CoinPresolveMatrix(int ncols0_in=60, double maxmin=-1.0000000000000000, ClpSimplex * si=0x023ad770, int nrows_in=0, int nelems_in=0, bool doStatus=true, double nonLinearValue=0.00000000000000000, double bulkRatio=2.0000000000000000)  Line 1175 + 0x1e bytes	C++
 	test.exe!ClpPresolve::gutsOfPresolvedModel(ClpSimplex * originalModel=0x0012ee4c, double feasibilityTolerance=1.0000000000000000e-008, bool keepIntegers=false, int numberPasses=5, bool dropNames=true, bool doRowObjective=false)  Line 1467 + 0x47 bytes	C++
 	test.exe!ClpPresolve::presolvedModel(ClpSimplex & si={...}, double feasibilityTolerance=1.0000000000000000e-008, bool keepIntegers=false, int numberPasses=5, bool dropNames=true, bool doRowObjective=false)  Line 102 + 0x2c bytes	C++
 	test.exe!ClpSimplex::initialSolve(ClpSolve & options={...})  Line 590 + 0x2d bytes	C++
 	test.exe!OsiClpSolverInterface::initialSolve()  Line 275	C++
 	test.exe!CbcModel::initialSolve()  Line 1992 + 0x14 bytes	C++
 	test.exe!Solver::CbcSolver::solve()  Line 374	C++
 	test.exe!Solver::AbstractSolver::optimise()  Line 400 + 0xf bytes	C++
 	test.exe!MaxBenchConstraintTest::testMaxBenchConstraintAgainstSCtPlanner()  Line 114	C++
 	test.exe!CppUnit::TestCaller<MaxBenchConstraintTest>::runTest()  Line 173	C++
 	test.exe!CppUnit::TestCaseMethodFunctor::operator()()  Line 32 + 0x16 bytes	C++
 	test.exe!CppUnit::DefaultProtector::protect(const CppUnit::Functor & functor={...}, const CppUnit::ProtectorContext & context={...})  Line 15 + 0xf bytes	C++
 	test.exe!CppUnit::ProtectorChain::ProtectFunctor::operator()()  Line 20 + 0x23 bytes	C++
 	test.exe!CppUnit::ProtectorChain::protect(const CppUnit::Functor & functor={...}, const CppUnit::ProtectorContext & context={...})  Line 77 + 0xf bytes	C++
 	test.exe!CppUnit::TestResult::protect(const CppUnit::Functor & functor={...}, CppUnit::Test * test=0x02386488, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & shortDescription="")  Line 178 + 0x1d bytes	C++
 	test.exe!CppUnit::TestCase::run(CppUnit::TestResult * result=0x0012fe94)  Line 92 + 0x85 bytes	C++
 	test.exe!CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult * controller=0x0012fe94)  Line 64 + 0x30 bytes	C++
 	test.exe!CppUnit::TestComposite::run(CppUnit::TestResult * result=0x0012fe94)  Line 23 + 0x13 bytes	C++
 	test.exe!CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult * controller=0x0012fe94)  Line 64 + 0x30 bytes	C++
 	test.exe!CppUnit::TestComposite::run(CppUnit::TestResult * result=0x0012fe94)  Line 23 + 0x13 bytes	C++
 	test.exe!CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult * result=0x0012fe94)  Line 46 + 0x1e bytes	C++
 	test.exe!CppUnit::TestResult::runTest(CppUnit::Test * test=0x02385748)  Line 145 + 0x13 bytes	C++
 	test.exe!CppUnit::TestRunner::run(CppUnit::TestResult & controller={...}, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & testPath="")  Line 95 + 0x13 bytes	C++
 	test.exe!main(int argc=1, char * * argv=0x02383698)  Line 46 + 0x30 bytes	C++
 	test.exe!__tmainCRTStartup()  Line 318 + 0x19 bytes	C
 	test.exe!mainCRTStartup()  Line 187	C
 	kernel32.dll!7d4e992a() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	

Change History (2)

comment:1 Changed 12 years ago by forrest

  • Owner changed from somebody to forrest
  • Status changed from new to assigned

comment:2 Changed 12 years ago by forrest

  • Resolution set to fixed
  • Status changed from assigned to closed

I have added some patches to initialSolve - works for the case I tried in trunk and branches/devel

Note: See TracTickets for help on using tickets.