[Ipopt] [Coin-discuss] Trouble with C interface: glibc memory corruption error

Stefan Vigerske stefan at math.hu-berlin.de
Wed May 28 10:26:19 EDT 2008


Hi,

I copy my answer to the Ipopt mailing list. Maybe this belongs more to 
there.

Can you create a debugging build (--enable-debug) and run valgrind to 
see where the first time something goes wrong in the program?
Or, if not valgrind, then gdb.

Or do you have some code that can be used to reproduce your problem?

Stefan

John Pye write:
> Hi all
> 
> I'm working on a interface to IPOPT from the C language, but I'm running 
> into a problem that I'm having trouble debugging.
> 
> What happens is that I'm getting a 'glibc detected' 'memory corruption 
> (fast)' error :-)
> 
>> *** glibc detected *** /home/john/ascend/test.py: malloc(): memory 
>> corruption (fast): 0x082b21c0 ***
>> Terminated
> 
> I added some commenting output to CreateIpoptProblem, and I found that 
> the error occurs somewhere inside the Ipopt::IpoptApplication 
> constructor called from within that function (IpStdCInterface.cpp line 
> ~100).
> 
> I wonder if anyone might be able to suggest what possibly things I might 
> have done wrong in my call to CreateIpoptProblem that could lead to this 
> sort of extreme error? I'm rather puzzled.
> 
> Also, I tried to turn on the IPOPT debug output, but didn't seem to 
> succeed. What is the correct way of getting deboug output from IPOPT?
> 
> Would appreciate any suggestions.
> 
> Cheers
> JP
> 
> 
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
> 


-- 
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan


More information about the Ipopt mailing list