Opened 11 years ago

Closed 9 years ago

#43 closed defect (duplicate)

Win32 memory allocation problem.

Reported by: tomba Owned by: somebody
Priority: blocker Component: component1
Version: older Keywords: Win32 memory fault CBC
Cc:

Description

We are using CBC version 2.0.0 (CBCSolve standalone console application with little modification to make MPS file), to perform a MILP binary problem on win32 platform (windows XP). Program is compiled by MS Visual Studio 2005 version 8.0.50727. In many cases it works fine, but here we have one case (TZ.MPS file) where after some time (about half hour - depends on processor power) exception std::bad_alloc is raised. A new operator, from which exception is raised, is located in CoinPackedMatrix?.cpp line 2460, as you can see in print screens attached. Lack of memory is not the problem! During the execution of program, memory, seeing from Windows Task Manager, raised from 30MB to 70MB, but more then 1GB of RAM was free.

Identical or similar problem was detected by AJK (CbcModel?.cpp, line5369)

Questions: Is there something that we can modify in our system that will help to solve this problem on Win32 platform?

Attached files: BadAlloc_ScreenShoots.zip - CBCSolve_BadAllocXX.JPG - print screens of call stack

Example.zip - MPS file to perform test

Thanks,

Dragan Tomic

Attachments (1)

Example.zip (14.0 KB) - added by tomba 11 years ago.

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by tomba

comment:1 Changed 11 years ago by tomba

Because of atachment memory limits, BadAlloc_ScreenShoots.zip not attached.

comment:2 follow-up: Changed 11 years ago by jpfasano

I have duplicated the problem in debug mode with the code from trunk using the MS V8 compiler.

The message displayed in a popup window is "Unhandled exception at 0x7c812a5b in cbc.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x001219dc."

It occurs at line 2608 of CoinPackedMatrix.cpp which is

   double * newElem = new double[maxSize_];

where maxSize_ is 32412.

I don't know if this is a Cbc(or CoinUtils) problem. The Operating system is failing to return the requested memory.

comment:3 in reply to: ↑ 2 Changed 11 years ago by tomba

Replying to jpfasano:

I have duplicated the problem in debug mode with the code from trunk using the MS V8 compiler.

The message displayed in a popup window is "Unhandled exception at 0x7c812a5b in cbc.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x001219dc."

It occurs at line 2608 of CoinPackedMatrix.cpp which is

   double * newElem = new double[maxSize_];

where maxSize_ is 32412.

I don't know if this is a Cbc(or CoinUtils) problem. The Operating system is failing to return the requested memory.

You are right. The problem was detected in Cbc project, but it is problem in CoinUtils? project. We report this problem in CoinUtils? project.

We try to catch exceptions in our calling program, but we lost any information about solution process. Before exception Cbc find Best Objective and Best Possible Objective solution.

Q: How to save this current solution after exception (memory bad allocation) ?
Q: How to solve memory lack because no memory deallocation when exception raised.
Q: Who can help about this problem?

Thanks a lot,

Tomba

comment:4 Changed 9 years ago by tkr

  • milestone milestone1 deleted

Milestone milestone1 deleted

comment:5 Changed 9 years ago by tkr

  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from 2.0 to older
Note: See TracTickets for help on using tickets.