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