|Subject:||Re: Stack Overflow Error|
|Posted by:||Ron (email@example.com)|
|Date:||Mon, 24 May 2004|
I take it that you have tried rebuilding the project with a larger minimum
stack size and seeing if this fixes the issue?
(Project|Options|Linker|Memory sizes) The default is $4000 (16k) but for a
client app you can push this right up. If you haven't already done so, I'd
rebuild with a stack size of $10000 to see if it fixes the problem - if it
does, you can try trimming it down.
My reasoning is as follows: Maybe your app is being allocated less stack
space on the new server configuration than previously and this is exposing a
problem. I do know that if you have a large read timeout and you are using
antifreeze, you can blow the stack through a recursive aspect of Indy (this
has since been removed).
The other things possibly worth looking at are the events that get fired
when you connect ... onConnect, AfterLogin etc ... a stack overflow can be
caused by simply corrupting the stack by overwriting the stack frame
ptrs/return addr etc and when the function unwinds you could see a stack
overflow error. As to why you get it after a change in environment ? ...
well you have the code to look at and only you can answer that.
Personally, I'd spend some time in the debugger with breakpoints in all of
the event handlers to see where it goes wrong, failing that (the customer
may not like this!) - I'd add some detailed logging to the code to focus in
on the problem.
Hope this helps
"Dominic Godin" <nospam@plz> wrote in message
> I'm using Delphi 5 to upload some text files to an ftp server. Our
> application uses Indy 9.00.11. We have been using this application
> a problem for about a year. One of our clients has rebuilt their server
> and we reinstalled this application on it. It now throws a Stack Overflow
> error when trying to run the following code.
> IdFtpCon.Host := ftpServer;
> IdFtpCon.Port := ftpPort;
> IdFtpCon.Username := userName;
> IdFtpCon.Password := password;
> IdFtpCon.ReadTimeout := timeOut * 1000;
> The server has a connection to the internet and other FTP clients (tried
> smartFTP) work without a problem. I've upgraded to Indy 9.00.14 but this
> didn't solve the problem.
> Any ideas?
> Dominic Godin
Stack Overflow Error posted by Dominic Godin on Fri, 21 May 2004