curl-users
libcurl causing ASSERT
Date: Thu, 04 Aug 2005 12:13:18 -0700
I am using CURL in a Win32 MFC application. It's been working fine until
recently. For some reason it's now causing an ASSERT in various places,
all about IsValidHeapPointer.
I'm using the multi interface, with one easy. When my MFC Dialog opens,
in the InitDialog function I setup a timer. In the timer function I call
another function which sets up the CURL stuff, creates an easy CURL,
creates the multi CURL, etc, etc.
The timer function also calls curl_multi_perform.
The timer function then sets itself up to be called agian.
On the next call the timer function calls curl_multi_perform and checks
to see if it is done. If it is it calls the function which sets up CURL
stuff again. This function also cleans up the old CURL pointers.
At first the ASSERT was occuring because of curl_easy_cleanup in this
function, and according to the debugger is a result of a free() call by
libcurl.
After moving things and trying to figure out what was wrong the ASSERT
started happening on curl_multi_perform.
In both cases libcurl is calling disconnect which calls free, which
causes the assert.
What could I be doing wrong?
~Bill
Received on 2005-08-04