M-Brig 0 Posted July 24, 2020 Hello Everyone, Hope everyone is doing well. We have been using the FTP ICS component for about 15 years now. We have a customer that is encountering a Floating Point Overflow error when retrieving files from an FTP Server. We are not using any real values in our code and we have Overflow Checking Runtime Errors off. They are retrieving the full file but right after it comes in we get the floating point error. Going over the code in the OverbyteIcsFtpCli.pas file we noticed that there is a debuglog procedure. Can someone let me know how to turn this on and where is the log file saved. We are hoping this will help us find the overflow error. Thanks for all your help and stay safe. Maria Share this post Link to post
M-Brig 0 Posted July 24, 2020 Sorry forgot to tell you we are using version 8.58. Thank you. Share this post Link to post
Angus Robertson 574 Posted July 25, 2020 Someone else mentioned a similar bug recently, but can not find the message. I fixed a bug calculating the speed of zero second FTP transfers 15 years ago that resulted in a similar error, but this would not happen with more recent releases. ICS does have a n TicsLogger component that developers can add to their applications, but it is primarily for internal debugging of SSL applications, older components needed to be updated to log events and that was never done consistently. Newer components like TIcsFtpMulti and TSslHttpRest have ProgressEvent or OnHttpRestProg events, and LogLevel or DebugLevel properties that can be used for screen display and file logging. If you continue using the older TFtpCli component you will need to add logging the onFtpClientDisplay and OnFtpResponse events to log the FTP protocol commands and responses so you can see at which point the error is happening. Angus Share this post Link to post
FPiette 383 Posted July 25, 2020 If the problem is reproducible, try running the application under the debugger. If it only happens on the customer computer, ask him if you can use Delphi Remote Debugger thru Internet. The debugger will readily show where the exception occurs. And by the way, try downloading the same file using one of ICS demos to be sure the issue is located in ICS or in your application. François Share this post Link to post
M-Brig 0 Posted July 26, 2020 Hello Angus and Francois, Thank you for your response. The problem is not reproducible on our side. Our client is in a secure location and we can not get access to the device. We have to rely on them to test. Angus that was me who reported this problem about a month or so ago. When you mentioned that it did have a problem in the older version we upgraded the component to the 8.58 version. They tested with the latest version and it is still producing the Float Point Overflow error. It downloads the first 6 files just fine and crashes on the 7 file. So it does not seem to be consistent. Hard one to debug. Francois we are not using any floating points in our code, only integers and int64. The int64 is only used for the OnProgress64 event. We see there are two events in the FTPClient component, OnResponse and OnDisplayFile. Can you send me any links for the help or examples using the OnResponse and the OnDisplayFile Events. We will try these to see if we can track the problem. Also, we can not find any documentation on the following 3 properties, BandWidthLimit, BandWidthSampling and the DataSocketSndBufSize. We were thinking about increasing the values for these properties. Maybe it's a boundary issue. Thank you for all your help. Maria Share this post Link to post
Angus Robertson 574 Posted July 26, 2020 Look in the TIcsFtpMulti component to see how it logs using the OnResponse and OnDisplayFile. events. As Francois suggests, you can build the OverbyteIcsXferTst sample that uses that component, check it yourself, then get your client to transfer the same file on their system with it, to see if it fails. How large or small is this file? The sample creates a log file. Angus Share this post Link to post
Fr0sT.Brutal 900 Posted July 26, 2020 Any exception has it address pointing to a place in app's code. Why not look at that place? Moreover you can retrieve full call stack when an exception is thrown Share this post Link to post
M-Brig 0 Posted July 28, 2020 Hello Angus, Thanks you for your response. We will work with the OverbyteICSXferTst application and have our client test with that to see where the problem is occurring. All the files they are downloading are around 240k. Thanks for all your help. We will let you know what we find. Stay safe. Share this post Link to post
David Heffernan 2345 Posted July 28, 2020 Adding madExcept or EurekaLog or similar is the obvious way to find out what is going on here. Share this post Link to post