ReadDirectory function crashes

Hi, i am trying to download the contents of n FTP folder using your library components. Everything works fine until the folder reaches a particular size, then it crashes on the ReadDirectory call.

My folder size is 1.25GB, one of the files is 658MB and then the largest file is 121MB. From here all other files are between 2MB and 25MB.

Can you please inform me when s fix will be out?

Cheers

Hello ..

Can you reproduce the problem with the SmartFTP FTP client? If yes, can you post or email the raw directory listing of the directory where it crashes?

Thanks
-Mat

Yes the problem does occur with the client as well as the library, how do i send you a raw listing?? I am not sure how to do this or what it is.

Is it the listing of all the files and the size of each one??

Cheers

![[[RAWLISTING][/RAWLISTING]][/[RAWLISTING][/RAWLISTING]]][/[[RAWLISTING][/RAWLISTING]][/[RAWLISTING][/RAWLISTING]]]

The directory is actually a virtual directory and cannot be seen unless you type a command into your FTP client, so i had to do the DIR command from the command prompt.

Volume in drive D is Data
Volume Serial Number is 922C-7B84

Directory of D:SQLSafeBackup

21/11/2005 09:58 <DIR> .
21/11/2005 09:58 <DIR> ..
21/11/2005 09:58 0 list.txt
21/11/2005 09:53 28,776,448 WDU346_ASPLOGIN55_01_full.safe
21/11/2005 09:53 378,880 WDU346_BuildSoft_01_full.safe
21/11/2005 09:53 137,728 WDU346_DataDictionary_01_full.safe
21/11/2005 09:53 9,285,632 WDU346_ECN000_01_full.safe
21/11/2005 09:54 8,465,408 WDU346_ECN001_01_full.safe
21/11/2005 09:54 4,477,952 WDU346_ECN002_01_full.safe
21/11/2005 09:54 19,889,152 WDU346_ECN003_01_full.safe
21/11/2005 09:54 22,359,040 WDU346_ECN004_01_full.safe
21/11/2005 09:54 19,585,536 WDU346_ECN005_01_full.safe
21/11/2005 09:54 3,598,848 WDU346_ECN006_01_full.safe
21/11/2005 09:54 42,203,136 WDU346_ECN007_01_full.safe
21/11/2005 09:54 5,136,896 WDU346_ECN008_01_full.safe
21/11/2005 09:54 1,270,272 WDU346_ECN009_01_full.safe
21/11/2005 09:54 9,240,576 WDU346_ECN010_01_full.safe
21/11/2005 09:54 3,317,760 WDU346_ECN011_01_full.safe
21/11/2005 09:54 12,583,936 WDU346_ECN012_01_full.safe
21/11/2005 09:54 4,089,344 WDU346_ECN013_01_full.safe
21/11/2005 09:54 36,610,560 WDU346_ECN014_01_full.safe
21/11/2005 09:54 10,097,152 WDU346_ECN015_01_full.safe
21/11/2005 09:54 3,876,864 WDU346_ECN016_01_full.safe
21/11/2005 09:54 5,163,520 WDU346_ECN017_01_full.safe
21/11/2005 09:54 10,080,768 WDU346_ECN018_01_full.safe
21/11/2005 09:54 9,207,808 WDU346_ECN019_01_full.safe
21/11/2005 09:54 7,205,376 WDU346_ECN020_01_full.safe
21/11/2005 09:54 2,544,128 WDU346_ECN021_01_full.safe
21/11/2005 09:54 4,248,064 WDU346_ECN022_01_full.safe
21/11/2005 09:55 5,669,376 WDU346_ECN023_01_full.safe
21/11/2005 09:55 7,308,800 WDU346_ECN024_01_full.safe
21/11/2005 09:55 5,589,504 WDU346_ECN025_01_full.safe
21/11/2005 09:55 6,659,584 WDU346_ECN026_01_full.safe
21/11/2005 09:55 3,416,576 WDU346_ECN027_01_full.safe
21/11/2005 09:55 2,605,056 WDU346_ECN028_01_full.safe
21/11/2005 09:55 2,925,568 WDU346_ECN029_01_full.safe
21/11/2005 09:55 4,299,776 WDU346_ECN030_01_full.safe
21/11/2005 09:55 9,420,800 WDU346_ECN031_01_full.safe
21/11/2005 09:55 3,580,416 WDU346_ECN032_01_full.safe
21/11/2005 09:55 3,177,472 WDU346_ECN033_01_full.safe
21/11/2005 09:55 4,890,112 WDU346_ECN034_01_full.safe
21/11/2005 09:55 1,745,920 WDU346_ECN035_01_full.safe
21/11/2005 09:55 1,868,288 WDU346_ECN036_01_full.safe
21/11/2005 09:55 29,551,616 WDU346_ECN037_01_full.safe
21/11/2005 09:55 2,975,744 WDU346_ECN038_01_full.safe
21/11/2005 09:55 11,677,696 WDU346_ECN039_01_full.safe
21/11/2005 09:55 6,080,512 WDU346_ECN040_01_full.safe
21/11/2005 09:55 6,526,976 WDU346_ECN041_01_full.safe
21/11/2005 09:55 5,984,256 WDU346_ECN042_01_full.safe
21/11/2005 09:55 4,694,016 WDU346_ECN043_01_full.safe
21/11/2005 09:55 5,980,672 WDU346_ECN044_01_full.safe
21/11/2005 09:55 3,067,392 WDU346_ECN045_01_full.safe
21/11/2005 09:55 7,517,184 WDU346_ECN046_01_full.safe
21/11/2005 09:55 5,376,512 WDU346_ECN047_01_full.safe
21/11/2005 09:55 10,248,704 WDU346_ECN048_01_full.safe
21/11/2005 09:55 3,415,552 WDU346_ECN049_01_full.safe
21/11/2005 09:56 135,273,984 WDU346_ECN050_01_full.safe
21/11/2005 09:56 5,864,448 WDU346_ECN051_01_full.safe
21/11/2005 09:56 19,958,272 WDU346_ECN052_01_full.safe
21/11/2005 09:56 8,885,248 WDU346_ECN053_01_full.safe
21/11/2005 09:56 2,874,368 WDU346_ECN054_01_full.safe
21/11/2005 09:56 1,957,888 WDU346_ECN055_01_full.safe
21/11/2005 09:56 5,281,280 WDU346_ECN056_01_full.safe
21/11/2005 09:56 4,844,544 WDU346_ECN057_01_full.safe
21/11/2005 09:56 3,644,928 WDU346_ECN058_01_full.safe
21/11/2005 09:56 1,497,088 WDU346_ECN059_01_full.safe
21/11/2005 09:57 678,273,536 WDU346_ECN060_01_full.safe
21/11/2005 09:57 4,494,848 WDU346_ECN061_01_full.safe
21/11/2005 09:57 3,046,912 WDU346_ECN062_01_full.safe
21/11/2005 09:57 30,241,280 WDU346_ECN063_01_full.safe
21/11/2005 09:57 1,680,384 WDU346_ECN064_01_full.safe
21/11/2005 09:57 1,782,784 WDU346_ECN065_01_full.safe
21/11/2005 09:57 4,557,312 WDU346_ECN066_01_full.safe
21/11/2005 09:57 1,686,016 WDU346_ECN067_01_full.safe
21/11/2005 09:57 7,638,528 WDU346_ECN068_01_full.safe
21/11/2005 09:57 4,442,624 WDU346_ECN069_01_full.safe
21/11/2005 09:57 17,886,720 WDU346_ECN070_01_full.safe
21/11/2005 09:57 1,284,608 WDU346_ECN071_01_full.safe
21/11/2005 09:57 5,079,040 WDU346_master_01_full.safe
21/11/2005 09:57 136,192 WDU346_model_01_full.safe
21/11/2005 09:57 11,745,792 WDU346_msdb_01_full.safe
21/11/2005 09:57 375,808 WDU346_SQLsafeRepository_01_full.safe
80 File(s) 1,414,519,296 bytes
2 Dir(s) 40,643,309,568 bytes free

Please send the raw directory listing and not the DIR from the command prompt. And don't forget to send the complete log of your FTP session as well.

Thanks
-Mat

If you cannot see the directory within SmartFTP, but still access it, you can toggle the command line pane (Shift-F5) and enter CWD <dir_name> there. Then SmartFTP will change into the directory and will display it in the tree view. Then you can select to show the Raw Listing from the directory context menu.

THE LOG-----------

SmartFTP v1.5.990.26
Resolving host name "84.40.1.88"
Connecting to 84.40.1.88 Port: 21
Connected to 84.40.1.88.
220 Microsoft FTP Service
USER (hidden)
331 Password required for (hidden).
PASS (hidden)
230 User (hidden) logged in.
SYST
215 Windows_NT
FEAT
211-FEAT
SIZE
MDTM
211 END
TYPE I
200 Type set to I.
REST 0
350 Restarting at 0.
PWD
257 "/" is current directory.
PASV
227 Entering Passive Mode (84,40,1,88,19,174).
Opening data connection to 84.40.1.88 Port: 5038
LIST -aL
125 Data connection already open; Transfer starting.
1468 bytes transferred. (20.4 KB/s) (70 ms)
226 Transfer complete.
CWD ./sqlsafe
250 CWD command successful.
PWD
257 "/sqlsafe" is current directory.
PASV
227 Entering Passive Mode (84,40,1,88,19,178).
Opening data connection to 84.40.1.88 Port: 5042
LIST -aL
125 Data connection already open; Transfer starting.
226 Transfer complete.
Transfer Timeout (40s). Closing data connection.
2920 bytes transferred. (71 bytes/s) (00:00:40)
PASV
227 Entering Passive Mode (84,40,1,88,19,179).
Opening data connection to 84.40.1.88 Port: 5043
LIST -aL
125 Data connection already open; Transfer starting.
226 Transfer complete.
Transfer Timeout (40s). Closing data connection.
2920 bytes transferred. (74 bytes/s) (00:00:39)


THE RAW DIRECTORY-----

11-21-05 09:58AM 5403 list.txt
11-21-05 09:53AM 28776448 WDU346_ASPLOGIN55_01_full.safe
11-21-05 09:53AM 378880 WDU346_BuildSoft_01_full.safe
11-21-05 09:53AM 137728 WDU346_DataDictionary_01_full.safe
11-21-05 09:53AM 9285632 WDU346_ECN000_01_full.safe
11-21-05 09:54AM 8465408 WDU346_ECN001_01_full.safe
11-21-05 09:54AM 4477952 WDU346_ECN002_01_full.safe
11-21-05 09:54AM 19889152 WDU346_ECN003_01_full.safe
11-21-05 09:54AM 22359040 WDU346_ECN004_01_full.safe
11-21-05 09:54AM 19585536 WDU346_ECN005_01_full.safe
11-21-05 09:54AM 3598848 WDU346_ECN006_01_full.safe
11-21-05 09:54AM 42203136 WDU346_ECN007_01_full.safe
11-21-05 09:54AM 5136896 WDU346_ECN008_01_full.safe
11-21-05 09:54AM 1270272 WDU346_ECN009_01_full.safe
11-21-05 09:54AM 9240576 WDU346_ECN010_01_full.safe
11-21-05 09:54AM 3317760 WDU346_ECN011_01_full.safe
11-21-05 09:54AM 12583936 WDU346_ECN012_01_full.safe
11-21-05 09:54AM 4089344 WDU346_ECN013_01_full.safe
11-21-05 09:54AM 36610560 WDU346_ECN014_01_full.safe
11-21-05 09:54AM 10097152 WDU346_ECN015_01_full.safe
11-21-05 09:54AM 3876864 WDU346_ECN016_01_full.safe
11-21-05 09:54AM 5163520 WDU346_ECN017_01_full.safe
11-21-05 09:54AM 10080768 WDU346_ECN018_01_full.safe
11-21-05 09:54AM 9207808 WDU346_ECN019_01_full.safe
11-21-05 09:54AM 7205376 WDU346_ECN020_01_full.safe
11-21-05 09:54AM 2544128 WDU346_ECN021_01_full.safe
11-21-05 09:54AM 4248064 WDU346_ECN022_01_full.safe
11-21-05 09:55AM 5669376 WDU346_ECN023_01_full.safe
11-21-05 09:55AM 7308800 WDU346_ECN024_01_full.safe
11-21-05 09:55AM 5589504 WDU346_ECN025_01_full.safe
11-21-05 09:55AM 6659584 WDU346_ECN026_01_full.safe
11-21-05 09:55AM 3416576 WDU346_ECN027_01_full.safe
11-21-05 09:55AM 2605056 WDU346_ECN028_01_full.safe
11-21-05 09:55AM 2925568 WDU346_ECN029_01_full.safe
11-21-05 09:55AM 4299776 WDU346_ECN030_01_full.safe
11-21-05 09:55AM 9420800 WDU346_ECN031_01_full.safe
11-21-05 09:55AM 3580416 WDU346_ECN032_01_full.safe
11-21-05 09:55AM 3177472 WDU346_ECN033_01_full.safe
11-21-05 09:55AM 4890112 WDU346_ECN034_01_full.safe
11-21-05 09:55AM 1745920 WDU346_ECN035_01_full.safe
11-21-05 09:55AM 1868288 WDU346_ECN036_01_full.safe
11-21-05 09:55AM 29551616 WDU346_ECN037_01_full.safe
11-21-05 09:55AM 2975744 WDU346_ECN038_01_full.safe
11-21-05 09:55AM 11677696 WDU


My main concern is your library modules as i have wrote a simple program using your library that downloads all these files to our office. Once the readDirectory command has been done, it takes a very long time to read, then as soon as it starts to download the first file, it seems to lose the connection and attempts to reconnect.

If you would like the code that i have wrote please ask.

Hello ..

The raw listing you sent doesn't look complete because your data tranfser got aborted. Please send the complete listing. Please provide all information we requested. And this listing should crash the SmartFTP client?

Thanks
-Mat

Here is the listing again. It will read ok in the client, but not in the library version. But if you try to download all the files then it will crash both.

11-21-05 09:58AM 5403 list.txt
11-22-05 10:38AM 29623808 WDU346_ASPLOGIN55_Full.safe
11-22-05 10:38AM 379392 WDU346_BuildSoft_Full.safe
11-22-05 10:38AM 137216 WDU346_DataDictionary_Full.safe
11-22-05 10:38AM 9823232 WDU346_ECN000_Full.safe
11-22-05 10:38AM 8436224 WDU346_ECN001_Full.safe
11-22-05 10:38AM 4868096 WDU346_ECN002_Full.safe
11-22-05 10:38AM 20653056 WDU346_ECN003_Full.safe
11-22-05 10:38AM 25378304 WDU346_ECN004_Full.safe
11-22-05 10:38AM 17992704 WDU346_ECN005_Full.safe
11-22-05 10:38AM 3511296 WDU346_ECN006_Full.safe
11-22-05 10:38AM 47622144 WDU346_ECN007_Full.safe
11-22-05 10:38AM 5600768 WDU346_ECN008_Full.safe
11-22-05 10:38AM 1272832 WDU346_ECN009_Full.safe
11-22-05 10:38AM 9238016 WDU346_ECN010_Full.safe
11-22-05 10:38AM 3563520 WDU346_ECN011_Full.safe
11-22-05 10:38AM 11546624 WDU346_ECN012_Full.safe
11-22-05 10:38AM 4158464 WDU346_ECN013_Full.safe
11-22-05 10:38AM 35645952 WDU346_ECN014_Full.safe
11-22-05 10:39AM 10869760 WDU346_ECN015_Full.safe
11-22-05 10:39AM 4344832 WDU346_ECN016_Full.safe
11-22-05 10:39AM 5071360 WDU346_ECN017_Full.safe
11-22-05 10:39AM 9728512 WDU346_ECN018_Full.safe
11-22-05 10:39AM 8613888 WDU346_ECN019_Full.safe
11-22-05 10:39AM 6753792 WDU346_ECN020_Full.safe
11-22-05 10:39AM 2441216 WDU346_ECN021_Full.safe
11-22-05 10:39AM 4311552 WDU346_ECN022_Full.safe
11-22-05 10:39AM 5547008 WDU346_ECN023_Full.safe
11-22-05 10:39AM 7255040 WDU346_ECN024_Full.safe
11-22-05 10:39AM 5975040 WDU346_ECN025_Full.safe
11-22-05 10:39AM 6321152 WDU346_ECN026_Full.safe
11-22-05 10:39AM 3459072 WDU346_ECN027_Full.safe
11-22-05 10:39AM 2351104 WDU346_ECN028_Full.safe
11-22-05 10:39AM 2819072 WDU346_ECN029_Full.safe
11-22-05 10:39AM 4344320 WDU346_ECN030_Full.safe
11-22-05 10:39AM 9302528 WDU346_ECN031_Full.safe
11-22-05 10:39AM 3674624 WDU346_ECN032_Full.safe
11-22-05 10:39AM 3268608 WDU346_ECN033_Full.safe
11-22-05 10:39AM 4628992 WDU346_ECN034_Full.safe
11-22-05 10:39AM 1728000 WDU346_ECN035_Full.safe
11-22-05 10:39AM 2045952 WDU346_ECN036_Full.safe
11-22-05 10:40AM 30954496 WDU346_ECN037_Full.safe
11-22-05 10:40AM 3004928 WDU346_ECN038_Full.safe
11-22-05 10:40AM 11889152 WDU346_ECN039_Full.safe
11-22-05 10:40AM 6625280 WDU346_ECN040_Full.safe
11-22-05 10:40AM 6038016 WDU346_ECN041_Full.safe
11-22-05 10:40AM 5807616 WDU346_ECN042_Full.safe
11-22-05 10:40AM 4851712 WDU346_ECN043_Full.safe
11-22-05 10:40AM 6492672 WDU346_ECN044_Full.safe
11-22-05 10:40AM 3154432 WDU346_ECN045_Full.safe
11-22-05 10:40AM 7397376 WDU346_ECN046_Full.safe
11-22-05 10:40AM 5379072 WDU346_ECN047_Full.safe
11-22-05 10:40AM 10484224 WDU346_ECN048_Full.safe
11-22-05 10:40AM 3474432 WDU346_ECN049_Full.safe
11-22-05 10:40AM 133752832 WDU346_ECN050_Full.safe
11-22-05 10:40AM 5524992 WDU346_ECN051_Full.safe
11-22-05 10:40AM 18934272 WDU346_ECN052_Full.safe
11-22-05 10:41AM 9017344 WDU346_ECN053_Full.safe
11-22-05 10:41AM 3032576 WDU346_ECN054_Full.safe
11-22-05 10:41AM 1983488 WDU346_ECN055_Full.safe
11-22-05 10:41AM 5346304 WDU346_ECN056_Full.safe
11-22-05 10:41AM 5254656 WDU346_ECN057_Full.safe
11-22-05 10:41AM 3567616 WDU346_ECN058_Full.safe
11-22-05 10:41AM 1518592 WDU346_ECN059_Full.safe
11-22-05 10:41AM 677583360 WDU346_ECN060_Full.safe
11-22-05 10:41AM 4663296 WDU346_ECN061_Full.safe
11-22-05 10:41AM 3422720 WDU346_ECN062_Full.safe
11-22-05 10:41AM 29259776 WDU346_ECN063_Full.safe
11-22-05 10:41AM 1677824 WDU346_ECN064_Full.safe
11-22-05 10:41AM 1803264 WDU346_ECN065_Full.safe
11-22-05 10:42AM 3901440 WDU346_ECN066_Full.safe
11-22-05 10:42AM 1794560 WDU346_ECN067_Full.safe
11-22-05 10:42AM 7138304 WDU346_ECN068_Full.safe
11-22-05 10:42AM 4325888 WDU346_ECN069_Full.safe
11-22-05 10:42AM 17929728 WDU346_ECN070_Full.safe
11-22-05 10:42AM 1345536 WDU346_ECN071_Full.safe
11-22-05 10:42AM 5080064 WDU346_master_Full.safe
11-22-05 10:42AM 135680 WDU346_model_Full.safe
11-22-05 10:42AM 12636672 WDU346_msdb_Full.safe
11-22-05 10:42AM 397312 WDU346_SQLsafeRepository_Full.safe

Thanks.

The FTP client uses the FTP Library. Thus my guess is that the data transfer of the directory listing is unsuccessful and therefore the actual data (listing) never gets parsed. Try to set the correct data connection settings (Passive, DataConnectionType, DataConnectionMode, DataProtection, etc). You can also get a logfile from the FTP Library and you will see what doesn't work.

Regarding the crash. Your statement that SmartFTP is crashing when downloading the files is not very helpful. And secondly, you say the FTP Library cannot parse the directory listing but it's crashing when downloading the files inside this directory. Hmm :-)
If you can provide crash dumps which are automatically created we can try to look at it. Use the latest SmartFTP version before you produce the crash:
https://www.smartftp.com/download

-Mat
SmartFTP

Mat,

Basically when i run the custom code i have to download all the files in that directory, the code seems to read the directory, which it takes a while doing, and then as soon as it starts to try to download the first file, it says the connection has been lost and attempts to reconnect again.

Would you like the code??

Will this exe file, that you have sent me a link to, include a newer version of the library??

I am not really using the client, as i have wrote the code so it downloads automatically, but i will try it if you want??

Mat,

I have added the following and it appears to work.

FTP.DataProtection = sfFTPLib.enumDataProtection.ftpDataProtectionPrivate
FTP.DataTransferMode = sfFTPLib.enumDataTransferMode.ftpDataTransferModeStream
FTP.DataTransferType = sfFTPLib.enumDataTransferType.ftpDataTransferTypeASCII

Can you confirm that these are the correct settings that i should be using for what i am trying to achieve?

Darren

Hello ..

What you are requesting goes beyond pre-sales support. Please purchase a license and things may look a little bit different.

Thank you.
Regards,
SmartFTP

Mat,

can you answer this question the for me.

The backup software only downloads the first 42 files, is this a part of the evaluation library and i need a license for it to download all the files?

Darren

Mat,

I have just purchased a license from you. The company is Building Software Limited.

Can you now answer my questions?

Hello ..

Thank you. I've replied in the other thread. We need more information as requested before.

Regards,
-Mat