Jump to content


Photo

SFTP Library crashing Cscript.exe


  • Please log in to reply
8 replies to this topic

#1 Tredell

Tredell
  • Members
  • 8 posts

Posted 11 August 2009 - 10:04 PM

Hi,

I'm having a strange problem where the SFTP library crashes cscript.exe on obj.Connect(). This only occurs when I read the license key from a file (LoadLicenseKeyFile). If I use the LoadLicenseKeyData method from the example:

If obj.LoadLicenseKeyData(strKey) Then
WScript.Echo "Success"
Else
WScript.Echo "Failed"
End If


It always drops to the failed condition and the log file displays (I believe it only continuesbecause the DLL has not expired yet):

20090811 14:54:56.922 Thread(6860) Log file opened. LogLevel=7
20090811 14:54:56.926 Thread(6860) CLicenseKey::LoadData()
20090811 14:54:56.926 Thread(6860) CLicenseKey::LoadDataText()
20090811 14:54:56.926 Thread(6860) CLicenseKey::LoadDataXML()
20090811 14:54:56.954 Thread(6860) Log file closed.


The LoadLicenseKeyFile method does, however, successfully validates eventhough it causes the crash of Cscript.exe.

#2 Tredell

Tredell
  • Members
  • 8 posts

Posted 11 August 2009 - 10:17 PM

I just found the thread below which says to disable Compressions. I uncommented the line oSFTP.Compressions = arCompressions and it seems to work now.

#3 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 11 August 2009 - 10:31 PM

Does it crash with every SFTP server you are trying to connect to?

Is the crash with the oSFTP.Compression = arCompressions call or further down in the .Connect() call?

Regards,
Mat

#4 Tredell

Tredell
  • Members
  • 8 posts

Posted 17 August 2009 - 03:39 PM

Hi Mat,

I only tried connecting to a Cygwin SSH server. I'm not sure if the same behaviour would occur if I attempted to connect to a differnt SSH server.

The crash would occur on the obj.Connect() call. Uncommenting that line, oSFTP.Compression = arCompressions, stopped the crash from occuring.

Let me know if you need anymore information.

#5 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 17 August 2009 - 04:25 PM

Thank you for your reply. Can you try to see if it crashes when connecting to another SFTP server?

Did you also try to connect to the same server with the SmartFTP client?

Regards,
Mat

#6 Tredell

Tredell
  • Members
  • 8 posts

Posted 17 August 2009 - 06:27 PM

Hi Mat,

Connecting with the SmartFTP client does not cause a crash. I dont have another SFTP server that I can connect to. My company uses Cygwin so that's what I was testing on. If you know of another SFTP server to try i'd be more than happy to test it out.

#7 Tredell

Tredell
  • Members
  • 8 posts

Posted 19 August 2009 - 04:40 PM

It looks like I made a mistake. The script keeps producing a Failed Connection error (25) and cannot successfully connect to the SSH server. If I use the simple.wsf script it works, but doesnt work with mine. I've ran it through the debugger and all the settings seem to be correct so I'm not sure why it's failing.

This is all that shows up in the log file:

[20090819 17:29:12] SmartFTP FTP Library v1.5.21.0
[20090819 17:29:12] SSH-2.0-OpenSSH_5.2
[20090819 17:29:12] 2

Is there anyway to get more debugging information?

#8 Tredell

Tredell
  • Members
  • 8 posts

Posted 19 August 2009 - 05:39 PM

Ok.. I figured everything out. It was my lack of knowledge of what the MUI file was used for. I didn't realize the file had to be in a en-US subdirectory and had the file on the same level as the DLL. I've tested this and it was the cause of the crash on obj.Connect(). So now my script works whether I have the compression line commented or uncommented.


Sorry for the inconvenience,
Tredell

#9 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 19 August 2009 - 05:51 PM

No problem. Thanks for the feedback. I will see if we can add an additional check in case the en-us\* files are not where they should be.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users