[Cbc] Cbc 2.9 seg fault with adding SOS

John Forrest john.forrest at fastercoin.com
Tue Feb 20 11:08:33 EST 2018


Kish,

The code throws an error complaining about column 0 because the problem 
is an empty problem.  The lp->mipmodel creation at line 20 of sos.cpp 
clones the lp at the time - which is empty.

The coin_loadprob at line 96 adds columns to the lp - not the cloned lp.

Try using

     lp->Solver = new OsiXxxSolverInterface();
     lp->mipmodel = new CbcModel();
     OsiSolverInterface * solver = lp->Solver;
     lp->mipmodel->assignSolver(solver);

Not sure what has changed from 2.8

John

On 20/02/18 15:10, Kish Shen wrote:
> Hi,
>
> I mentioned that I have been getting seg fault from Cbc 2.9 
> (downloaded about a week ago) when I tried to add SOS to the problem. 
> I have now managed to produce a program that reproduce the crash. It 
> happen when a CbcSOS object is created, and not in addObjects().
>
> As the problem needed to produce this was quite small, I was able to 
> simplify the program to be in a single file, which I attach to this 
> post. If I made any mistake in simplifying the program, I can send the 
> original version, which requires extra support files from our system 
> to compile.
>
> The program is extracted from calls to Cbc from our interface. The 
> same calls worked with Cbc 2.8 (downloaded nearly 2 years ago).
>
> Thanks in advance for any information or help in resolving this problem.
>
> Cheers,
>
> KIsh
>
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> https://list.coin-or.org/mailman/listinfo/cbc


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20180220/90c31231/attachment.html>


More information about the Cbc mailing list