cURL / Mailing Lists / curl-library / Single Mail

curl-library

Running curl in a loop (c++) - crash

From: Christian Rauhut <crauhut_at_web.de>
Date: Sun, 30 Aug 2009 22:31:48 +0200

Hello,

 

I am using the curl library exactly as the example "getinmemory.c" shows.
For one Request it works very well, but I have a loop that calls my curl
function many times. The first run works, but in the second run of the loop
my program crashes while "curl_easy_perform(curl)". The debugger goes to
malloc.c. So I think there must be a mistake with the
"WRITEFUNCTION"/"WRITEDATA" option

 

This is the message Visual Studio shows while debugging:

 

Windows has triggered a breakpoint in xxxx.exe.

This may be due to a corruption of the heap, which indicates a bug in
xxxx.exe or any of the DLLs it has loaded.

 

I hope someone can help with this problem

 

Best regards

cr
Received on 2009-08-30