Opened 13 years ago

Closed 12 years ago

#18 closed defect (fixed)

Memory crash in CLP, file ClpPrimalColumnSteepest.cpp; pivotsequence

Reported by: ltaylor Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: vector memory access pivot variable primal column steepest Cc:


I am using MS Visual Basic to call COINMP, which uses the clp code.

The application caught an exception while performing LP; crash was accessing forbidden memory.

I had had several crashes previously, but I had not been able to catch it. This time, debugging was turned on for all modules down to this one. clpprimalcolumnsteepest.cpp about line 2804 file appears to be current as of today, 2-13-08

This is the code:

	if (pivotSequence_>=0) {
	  // save pivot order
	  // change from pivot row number to sequence number

I am guessing from the comment and from the code that it probably should be a reference like this instead ...

pivotSequence_ =pivotVariable[pivotRow]

When debugging caught the error, pivotSequence_ was 2961, while the capacity of pivotVariable was only 199.

The attached file contains:

  • locals
  • error message as given by MS Visual Studio
  • stack trace

Attachments (1)

MemoryAccessCrash-080213.txt (3.6 KB) - added by ltaylor 13 years ago.
Error, stack, locals

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by ltaylor

Error, stack, locals

comment:1 Changed 13 years ago by ltaylor

It seems to me now that this error occurs because, somewhere, pivotSequence_ should be set back to -1 or something, and it isn't always.

If pivotSequence was used before, when pivotVariable[] was a large array, and not reset, and then used again when pivotVariable[] is a small array, it could cause this error.


comment:2 Changed 13 years ago by ltaylor

I was unable to upload the MPS file corresponding to the problem that COIN-MP was working on when it crashed. (Even compressed and zipped, it exceeded the maximum attachment size.)

I would be happy to upload this file, 44 Mb, or its zip archive, 6 Mb, on request. How can we do this?

Of course, since this is a memory-based problem, it probably depends on the specific configuration in order to crash. It should, however, always cause a violation of range-checking if you turn that on in debugging.

Finally, since I was using this module through COIN-MP calls and not as CLP stand-alone, there may possibly be some difference due to how it is called. I suspect that it would be deterministic, with the same steps and results, up to a point of range violation.

Let me know what I can do to help.


comment:3 Changed 12 years ago by forrest

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

It should be pivotSequence_ but the bug has been fixed anyway

Note: See TracTickets for help on using tickets.