curl-library
Re: Running curl in a loop (c++) - crash
Date: Sun, 30 Aug 2009 22:48:16 +0200
On Sunday 30 of August 2009 22:31:48 Christian Rauhut wrote:
> 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
So the example works fine for you, right? What exactly did you change
in the code when it stop working? Could you please attach something like
a minimal example?
> 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.
This message in fact does not say anything. Maybe be the location of the
breakpoint might give a hint.
> I hope someone can help with this problem
Definitely, you are at the right place I think...
Kamil
Received on 2009-08-30