Opened 11 years ago

Closed 20 months ago

#36 closed defect (migrated)

Application crash in Windows 2008 Server and Windows 7

Reported by: alexmuad Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: CLP library crash Windows 2008 Server and 7 Cc:


Brief Description

I wrote a driver of my own to use CLP libraries. This was working fine with Windows XP for months.

Then I needed to move to Windows 2008 Server and the application crashes at the end. After that I ran a test in Windows 7 and it fails too.


I ran the driver in Windows 2008 Server, it loads the model and solves it. The solution is fine, but the program crashes when it is about to end.

The problem happens when it calls the destructors to free the memory of the variables/objects when the main() scope ends.

Debugging the application I found that the problem is the gutsOfDelete() function from ClpModel? class. Specifically, the following statements:

delete [] rowActivity_;
delete [] columnActivity_;

Those are double *.

In debug mode, the following assertion in the operator delete function fails:

/* get a pointer to memory block header */
pHead = pHdr(pUserData);

/* verify block type */

In release mode, it throws an unhandled exception for access violation reading a memory block (see attachment).

I already tried adding try/catch blocks to the involved statements in the gutsOfDelete() function, but still not catching the exception. Tried CoinError? and generic exceptions without luck.

I'm using Visual Studio 2008. Also, when debugging the issue, the watch window shows that the pHead->nBlockUse checked in the assertion, is invalid (see attachment).

This gutsOfDelete() function is called many times during the different phases of the solving procedure, but it only fails in the last phase, when memory is being freed.

Attachments (2)

error.jpg (85.9 KB) - added by alexmuad 11 years ago.
Watch window on involved failing assertion
unhandled exception.jpg (20.8 KB) - added by alexmuad 11 years ago.
Exception thrown

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by alexmuad

Watch window on involved failing assertion

Changed 11 years ago by alexmuad

Exception thrown

comment:1 Changed 20 months 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.