Opened 8 years ago

Closed 3 years ago

#108 closed defect (migrated)

OsiSolverGrbInterface assertion failed

Reported by: Murilo.R.S Owned by: mjs
Priority: major Milestone:
Component: OsiGrb Version: 0.105
Keywords: Cc:


I am using the OsiSolverGrbInterface and some unexpected things are happened.

When I use the method deleteCols() and after that I use the method addCol(), I got

Assertion failed: minsize == 0 || coltype_ != NULL, file OsiSolverGrbInterface.cpp, line 187

This is because minsize > 0 and coltype_ == NULL, which in turn is due to the fact that in

OsiGrbSolverInterface::deleteCols(const int num, const int * columnIndices)

at lines 2437 to 2441 the following piece of code

if( coltype_ )
 delete[] coltype_;
 coltype_ = NULL;

deletes it. Although I cannot be sure, it seems to me that code is wrong, as coltype_ should only be deleted when *the last column* is deleted, leaving an empty problem; however, this is not the case.

Indeed, commenting out these lines the code works well in my application (as checked by comparing with OsiCpx).

I thought you may want to know. Maybe I'm wrong, and in this case I'd really appreciate if you could give me a hint about why the error may occur, but in the odd chance I'm right you may want to correct the issue.

If you need further details about how the assert() is produced I'll be happy to provide them.

Change History (1)

comment:1 Changed 3 years ago by stefan

  • Resolution set to migrated
  • Status changed from new to closed

This ticket has been migrated to GitHub and will be resolved there:

Note: See TracTickets for help on using tickets.