[Cbc] Seg fault with Cbc

Kish Shen kisshen at cisco.com
Wed Oct 8 20:47:18 EDT 2008


Hi,

A user of the ECLiPSe interface to CBC/CLP reported a problem which 
results in a seg fault. The problem is quite simple, first the
following problem is solved as a MIP problem, with presolve turned off.

Minimize
obj:Subject To
cons0:  - x0 + x1 <= 0
Bounds
  1 <= x0
  1 <= x1
  x2 Free
  x3 Free
  x4 Free
Integers
x1 x2 x3 x4
End

Note that the two variables in the constraint are fixed in value.

Next, a second constraint, involving x0 and x1, is added:

Minimize
obj:Subject To
cons0:  - x0 + x1 <= 0
cons1:  x1 - x2 <= -1
Bounds
  1 <= x0
  1 <= x1
  x2 Free
  x3 Free
  x4 Free
Integers
x1 x2 x3 x4
End

(the above are the problem in CBC written out in LP format, just before 
trying to solve them)

The seg fault happens when trying to solve this problem (again without 
presolve). Specifically, in the following line:

	lpd->lp->mipmodel = new CbcModel(static_cast<OsiSolverInterface 
&>(*mipsolver));

mipsolver is a OsiSolverInterface *, pointing to the problem (we use the 
OsiClpSolverInterface to store (and modify) the problem, and we obtain 
the CbcModel to perform CBC specific methods to solve MIP problems).

I have reproduced this problem without ECLiPSe, i.e. with the calls to 
CBC/OSI only. I am using the trunk branch of CBC, and the problem occurs 
in a CBC I downloaded via svn on 23 Sept 2008, and on an earlier version 
downloaded in Nov 2007. I can send these files.

With the CBC downloaded in Sept, I get the following output when running 
the program:

Clp0000I Optimal - objective value 0
pure virtual method called
terminate called without an active exception
Aborted

For the CBC downloaded in Dec 2007, I get these output:

Clp0000I Optimal - objective value 0
Cbc3007W No integer variables - nothing to do
Cbc3007W No integer variables - nothing to do
Cbc3007W No integer variables - nothing to do
Cbc0004I Integer solution of 0 found after 0 iterations and 0 nodes 
(0.00 seconds)
Cbc0001I Search completed - best objective 0, took 0 iterations and 0 
nodes (0.00 seconds)
Cbc0004I Integer solution of 0 found after 0 iterations and 0 nodes 
(0.00 seconds)
Cbc0001I Search completed - best objective 0, took 0 iterations and 0 
nodes (0.00 seconds)
Segmentation fault

--Kish Shen

-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.


More information about the Cbc mailing list