[Coin-discuss] Re:lpSimplex crash-----scale
Gabrielle A. Grün
grun at cs.sfu.ca
Wed Aug 10 02:04:14 EDT 2005
Hi COIN people,,
I have narrowed down the crash location to lines 1730 and 1731 of
ClpPackedMatrix.cpp, “ ClpPackedMatrix* rowCopy =
dynamic_cast< ClpPackedMatrix*>(rowCopyBase);”. One cannot use
dyanamuc_cast to convert a base class object to a child class object.
When these lines are replaced by the following:
ClpPackedMatrix * rowCopy= new ClpPackedMatrix ();
rowCopy->type_ = rowCopyBase->type();
delete [] rowCopy->getRhsOffset();
int numberRows1 = rowCopyBase->getNumRows();
if (rowCopyBase->getRhsOffset() &&numberRows1) {
rowCopy->rhsOffset_=
ClpCopyOfArray(rowCopyBase->getRhsOffset(),numberRows1);
} else {
rowCopy->rhsOffset_=NULL;
}
rowCopy->startFraction_ = rowCopyBase->startFraction();
rowCopy->endFraction_ = rowCopyBase->endFraction();
rowCopy-> savedBestDj_ = rowCopyBase->savedBestDj();
rowCopy->originalWanted_ = rowCopyBase->originalWanted();
rowCopy->currentWanted_ = rowCopyBase->currentWanted();
rowCopy->savedBestSequence_ = rowCopyBase->savedBestSequence();
rowCopy->lastRefresh_ = rowCopyBase->lastRefresh();
rowCopy->refreshFrequency_ = rowCopyBase->refreshFrequency();
rowCopy->minimumObjectsScan_ = rowCopyBase->minimumObjectsScan();
rowCopy->minimumGoodReducedCosts_ =
rowCopyBase->minimumGoodReducedCosts();
rowCopy->trueSequenceIn_ = rowCopyBase->getTrueSequenceIn();
rowCopy->trueSequenceOut_ = rowCopyBase->getTrueSequenceOut();
rowCopy->skipDualCheck_ = rowCopyBase->skipDualCheck();
The crash occurs at line 1739 “const int * column = rowCopy->getIndices();”
ss rowCopy->index_ appears to be never set. Thanks.
Gabrielle A. Grün, Ph.D. Student
School of Computing Science
Simon Fraser University
8888 University Drive
Burnaby, BC
V5A 1S6
<http://www.cs.sfu.ca/~grun>
More information about the Coin-discuss
mailing list