JB | 1 Sep 2005 04:57

Re: curl giving unhandled exception [was Re: unresolved symbol in 7.14.0]

> On Wed, 31 Aug 2005, JB wrote:
>
> > tried with curl_global_init both uncommented and commented as it isn't
clear
> > from the docs if curl_easy_init calls it for you
>
> In the man page for curl_global_init it says:
>
>    If this function hasn't been invoked when curl_easy_init(3) is called,
it
>    will be done automatically by libcurl.
>
> In my eyes this is pretty clear, but please let me know how I can rephrase
> this to be clearer!
>

Fair enough, my apologies...I had read the tutorial, and some other misc
howtos.  I had not read the man page for that function.  I will be more
thorough next time.

> > When I run the above, I get an unhandled exception after attempting to
free
> > mem on the heap.  The call stack looks like:
> >  msvcr71d.dll!_CrtIsValidHeapPointer(const void * pUserData=0x015d4d40)
> > Line 1807 C
> >  msvcr71d.dll!_free_dbg_lk(void * pUserData=0x015d4d40, int nBlockUse=1)
> > Line 1132 + 0x9 C
> >  msvcr71d.dll!_free_dbg(void * pUserData=0x015d4d40, int nBlockUse=1)
Line
> > 1070 + 0xd C
(Continue reading)

JB | 1 Sep 2005 05:44

Re: curl giving unhandled exception [was Re: unresolved symbol in 7.14.0]


> Does it happen every time?
>
> Can you try the most recent daily snapshot version and see if it works?

It's probably also worth noting that if I compile the Release version
without debug flags set, then it skips right over that and perform yeilds
error 23 (unable to write data).

JB | 1 Sep 2005 06:18

Re: curl giving unhandled exception [was Re: unresolved symbol in 7.14.0]


> Can you try the most recent daily snapshot version and see if it works?
>

FYI, I had to remove $(SSLLIBS) from Makefile.vc6 in LNK line of the
debug-ssl section in order to get the debug build to link.

With that link.exe was yielding:

ssleay32.lib(ssleay32.res) : fatal error LNK1241: resource file
libeay32.lib(lib
eay32.res) already specified
NMAKE : fatal error U1077: 'link.exe' : return code '0x4d9'
Stop.

JB | 1 Sep 2005 06:34

Re: curl giving unhandled exception [was Re: unresolved symbol in 7.14.0]

> Can you figure out more specificly what line number in the source that
final
> "client.exe!_Curl_destroy_thread_data() + 0x13 C" means?
>

OK, I'm using libcurld.lib from the snapshot...the call stack now looks like
this:

  msvcr71d.dll!_CrtIsValidHeapPointer(const void * pUserData=0x01614f40)
Line 1807 C
  msvcr71d.dll!_free_dbg_lk(void * pUserData=0x01614f40, int nBlockUse=1)
Line 1132 + 0x9 C
  msvcr71d.dll!_free_dbg(void * pUserData=0x01614f40, int nBlockUse=1)  Line
1070 + 0xd C
  msvcr71d.dll!free(void * pUserData=0x01614f40)  Line 1025 + 0xb C
  Client.exe!destroy_thread_sync_data(thread_sync_data * tsd=0x0181ff58)
Line 183 + 0xf C
  Client.exe!gethostbyname_thread(void * arg=0x01644d10)  Line 331 + 0x9 C
  msvcr71d.dll!_threadstartex(void * ptd=0x01645460)  Line 241 + 0xd C

The call to free in destroy_thread_sync_data is on line 183 of hostthre.c
and  call to destroy_thread_sync_data in gethostbyname_thread is on line 331
of hostthre.c

Is the DNS lookup failing and that is what is causing it?

JB | 1 Sep 2005 06:34

Re: curl giving unhandled exception [was Re: unresolved symbol in 7.14.0]

> Can you figure out more specificly what line number in the source that
final
> "client.exe!_Curl_destroy_thread_data() + 0x13 C" means?
>

OK, I'm using libcurld.lib from the snapshot...the call stack now looks like
this:

  msvcr71d.dll!_CrtIsValidHeapPointer(const void * pUserData=0x01614f40)
Line 1807 C
  msvcr71d.dll!_free_dbg_lk(void * pUserData=0x01614f40, int nBlockUse=1)
Line 1132 + 0x9 C
  msvcr71d.dll!_free_dbg(void * pUserData=0x01614f40, int nBlockUse=1)  Line
1070 + 0xd C
  msvcr71d.dll!free(void * pUserData=0x01614f40)  Line 1025 + 0xb C
  Client.exe!destroy_thread_sync_data(thread_sync_data * tsd=0x0181ff58)
Line 183 + 0xf C
  Client.exe!gethostbyname_thread(void * arg=0x01644d10)  Line 331 + 0x9 C
  msvcr71d.dll!_threadstartex(void * ptd=0x01645460)  Line 241 + 0xd C

The call to free in destroy_thread_sync_data is on line 183 of hostthre.c
and  call to destroy_thread_sync_data in gethostbyname_thread is on line 331
of hostthre.c

Is the DNS lookup failing and that is what is causing it?

Igor Polyakov | 1 Sep 2005 07:36
Favicon

TELNET support

Hello, libcurl.

Is this true that libcurl now supports reading input for TELNET
protocol only from stdin ?

If I want to transfer data from another source is there solution for
this besides creating pipe and overwriting stdin handle ?

--

-- 
Best regards,
 Igor Polyakov                          mailto:ipolyakov <at> issart.com

Miloš Zubal | 1 Sep 2005 10:25
Picon

problem with return value of curl_easy_getinfo

Hi,
i am experiencing a problem when getting effective url...
All i want to do is to get effective url without downloading
body. I get strange string in info variable after call to
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &info). Problem
is that this function return CURLE_OK while passing pointer to
strange data. Potentional hint could be that this "bug" occurs
only when passing url without path (i.e. http://www.google.com).

code looks this way:
	CURL *curl;
	CURLcode res;
	curl = curl_easy_init();
	if(curl) {
		curl_easy_setopt(curl, CURLOPT_URL, url->BuildURI().GetData());
		curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
		curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 5);
		curl_easy_setopt(curl, CURLOPT_NOBODY, 1);
		res = curl_easy_perform(curl);
		if (res != CURLE_OK) { 
			#ifdef MYLOG
			wxLogStatus("%s could not be resolved. Error code: %d",
url->BuildURI().c_str(), res); 			#endif // MYLOG
			return RESOLVE_URL_FAILED;
		}

		char* info = NULL;
		res = curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &info);
		if((CURLE_OK == res) && info) {
			url->Create(info);
(Continue reading)

Daniel Stenberg | 1 Sep 2005 10:31
Picon
Favicon

Re: problem with return value of curl_easy_getinfo

On Thu, 1 Sep 2005, Milo? Zubal wrote:

> i am experiencing a problem when getting effective url...

Using what libcurl version on what operating system?

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

Miloš Zubal | 1 Sep 2005 10:39
Picon

Re: problem with return value of curl_easy_getinfo

sorry for forgoting to provide it...
curl-7.14.0
MS Windows 2000 SP4

----- PŮVODNÍ ZPRÁVA -----
Od: "Daniel Stenberg" <daniel-curl <at> haxx.se>
Komu: "libcurl development" <curl-library <at> cool.haxx.se>
Předmět: Re: problem with return value of
Datum: 1.9.2005 - 10:37:26

> On Thu, 1 Sep 2005, Milo? Zubal wrote:
> 
> > i am experiencing a problem when getting effective
> > url...
> 
> Using what libcurl version on what operating system?
> 
> -- 
> Commercial curl and libcurl Technical Support:
> http://haxx.se/curl.html
> 

Daniel Stenberg | 1 Sep 2005 10:57
Picon
Favicon

The Distro Dilemma

Hey

I wrote down all details I could think of in the "Distro Dilemma" being 
discussed back and forth lately. (About libcurl linking with OpenSSL or GnuTLS 
and the related license issues.)

It is now available online here:

 	http://curl.haxx.se/legal/distro-dilemma.html

Feel free to point out my mistakes, and please share the info to suitable 
persons involved in affected distributions. Should you know any.

I decided not to personally get involved in the debian-devel discussions any 
further, as I intend to stand on the libcurl side in this and make sure we 
have a good project approach to this - for all distros and operating systems.

(That document is also known as docs/DISTRO-DILEMMA and is now included in the 
source release archive.)

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html


Gmane