[Coin-discuss] CoinRowCut and Sbb problems in MSVS 6.0
Alan King
kingaj at us.ibm.com
Thu Jun 19 21:41:04 EDT 2003
I ran into the same problem on Win32. I just commented out the "delete[]
A" line and it compiles and runs. Laci says he's going to run it all
through purify anyway.
Alan King
Mathematical Sciences, IBM Research
http://www.research.ibm.com/
http://www.research.ibm.com/people/k/kingaj/
University Relations: University of Washington
http://www.washington.edu
http://www.ibm.com/university
Yan Xu <yax2 at lehigh.edu>
Sent by: coin-discuss-admin at www-124.southbury.usf.ibm.com
06/19/2003 05:27 PM
Please respond to coin-discuss
To: coin-discuss at www-124.southbury.usf.ibm.com
cc:
Subject: [Coin-discuss] CoinRowCut and Sbb problems in
MSVS 6.0
Hi, I encounted some problems when using Sbb in Windows, compiler is
MSVS6.0
Question 1: Why following code crashes when delete [] A, but declaring A
as many other types (I tried int, char, ..., and some user-defined
class) is fine? Is there a problem in OsiRowCut ?
#include <iostream>
#include "OsiRowCut.hpp"
using namespace std;
int main()
{
int num = 0;
OsiRowCut* A = new OsiRowCut [num];
// int* A = new int [num]; // OTHER TYPE IS FINE
cout << "num = " << num << endl;
delete [] A; // CRASH HERE
return 0;
}
Question 2: When running Sbb with input data file: fiber, dcmutli, it
crashes. The place cause crash is line 1880 of SbbModel.cpp
delete [] addCuts;
After print numberToAdd, something like:
.......
numberToAdd = 15
numberToAdd = 25
numberToAdd = 6
numberToAdd = 3
numberToAdd = 4
numberToAdd = 5
numberToAdd = 0 // CRASH AFTER THIS LINE
I found when numberToAdd is 0, 'delete' crashes, which brings the first
question.
Anyone have some idea, thanks. By the way, I don't have these problems
in my Linux machine.
Yan
_______________________________________________
Coin-discuss mailing list
Coin-discuss at www-124.ibm.com
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20030619/7d109e89/attachment.html>
More information about the Coin-discuss
mailing list