<div dir="ltr">Hi Christian,<div><br></div><div>Looks like Stefan fixed at least one of these issues in trunk and stable. Can you take a look? </div><div><br></div><div>Cheers,</div><div><br></div><div>Ted</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 12, 2016 at 10:39 AM, Christian Troost <span dir="ltr"><<a href="mailto:christian.troost@uni-hohenheim.de" target="_blank">christian.troost@uni-hohenheim.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear OsiCpx-Team,<br>
<br>
I am currently testing the OsiCpxSolverInterface for our application.<br>
<br>
I stumbled over two issues that are probably bugs in the code:<br>
<br>
1) In OsiCpxSolverInterface::getRowActivity() the rowact_ array is never<br>
populated and remains unititialized if<br>
        if( probtypemip_ )<br>
        AND  #if CPX_VERSION >= 1100<br>
        AND  if( solntype != CPX_NO_SOLN )<br>
<br>
2) In OsiCpxSolverInterface::reset():<br>
<br>
OsiCpxSolverInterface calls parent OsiSolverInterface::setInitialData(),<br>
<br>
which does the following to the message handler:<br>
<br>
  if (defaultHandler_) {<br>
    delete handler_;<br>
    handler_ = NULL;<br>
  }<br>
  defaultHandler_=true;<br>
<br>
Now, what if a user passes in a message handler?<br>
According to the headers it is the users' responsibility to deallocate<br>
the message handler. So, assume the following sequence:<br>
<br>
A user allocates a message handler in his application<br>
The user passes in this message handler (this will set defaultHandler_=<br>
false) to OsiCpxSolverInterface.<br>
After some time, the user calls ->reset and deallocates the message<br>
handler in his application<br>
<br>
Since defaultHandler_ was false, handler_ has not been set to NULL in<br>
reset, but rather still points to the now deallocated memory.<br>
<br>
If the user now reuses the SolverInterface for the next problem, without<br>
passing in a messageHandler object the program may segfault on the first<br>
use of the message handler<br>
<br>
May not happen to often, but I had a problem and this seemed to be the<br>
reason ...<br>
<br>
<br>
Best,<br>
Christian<br>
_______________________________________________<br>
Osi mailing list<br>
<a href="mailto:Osi@list.coin-or.org">Osi@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/osi" rel="noreferrer" target="_blank">http://list.coin-or.org/mailman/listinfo/osi</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:12.8000001907349px">Dr. Ted Ralphs</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Professor, Lehigh University</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">(610) 628-1280</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">ted 'at' lehigh 'dot' edu</span><br style="font-size:12.8000001907349px"><a href="http://coral.ie.lehigh.edu/~ted" style="font-size:12.8000001907349px" target="_blank">coral.ie.lehigh.edu/~ted</a><br></div></div></div>
</div>