Arithmetic Overflow

Advertisement

RedJungle
Joined:
Posts:
4
Location:
Napier, New Zealand

Arithmetic Overflow

When attempting to open a session with a sFtp site I am getting an Arithmetic operation resulted in an overflow Error

Specific information is
Visual Studio 2012
.Net Framework 4.5
WinSCP 5.1.1
Renamed WinSCP.dll to WinSCPnet.dll
WinSCP.exe, WinSCP.dll and WinSCPnet.dll are in Bin directory. -> see https://winscp.net/forum/viewtopic.php?t=11808 for reason for 3 dlls
WinSCPnet.dll is correctly registered in Project and Project is compiling.

I am able to access and use the site by connecting directly with the WinSCP.exe, but when I attempt to use the .net dll, I get the following error.

System.OverflowException was caught
HResult=-2146233066
Message=Arithmetic operation resulted in an overflow.
Source=mscorlib
StackTrace:
at System.IntPtr.ToInt32()
at WinSCP.ConsoleCommStruct..ctor(Session session, SafeFileHandle fileMapping)
at WinSCP.ExeSessionProcess.AcquireCommStruct()
at WinSCP.ExeSessionProcess.InitializeConsole()
at WinSCP.ExeSessionProcess.Start()
at WinSCP.Session.Open(SessionOptions sessionOptions)
at Scantron.IPaper.BL.FtpDownload.TestConnection() in c:\Projects\BST Clients Direct\Scantron\IPaper\IPaperRinconBridge\FtpCsvBL\FtpDownload.cs:line 64
InnerException:




If you would be good enough to post up the source for the WinSCP.dll I would be more than happy to do a push to try to fix this problem

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Arithmetic Overflow

Thanks for your report.
I have sent you an email with source code to address you have used to register on this forum.

Reply with quote

Gophrntz
Joined:
Posts:
1

Re: Arithmetic Overflow

martin wrote:

Thanks for your report.
I have sent you an email with source code to address you have used to register on this forum.

Is there a resolution to this issue, I am seeing it as well. I am using PoSH (the example directly from this site) and receive the "Arithmetic operation resulted in an overflow" error when attempting to call $session.Open($sessionOptions).

thanks much.

[UPDATE] - Was on my Win8 machine using x64 version of Powershell.exe. Switch to x86 and it works correctly.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,478
Location:
Prague, Czechia

Re: Arithmetic Overflow

Gophrntz wrote:

Is there a resolution to this issue, I am seeing it as well. I am using PoSH (the example directly from this site) and receive the "Arithmetic operation resulted in an overflow" error when attempting to call $session.Open($sessionOptions).
Thanks for your report.
I have sent you an email with a dev version of WinSCP to address you have used to register on this forum.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,478
Location:
Prague, Czechia

devoured wrote:

I am seeing this error as well when attempting to open a session. How can I work around this issue?
Thanks for your report.
I have sent you an email with a debug version of WinSCP to address you have used to register on this forum.

Reply with quote

mprothme
Joined:
Posts:
2
Location:
Fayetteville

I am also getting the same error

Hello,

I am also currently running into this error. I've noticed that when I build this project in 32 bit mode (which I cannot do for production) that I don't get this error. Has this issue been addressed in a new release? Or how should I go about fixing this error?

Thanks!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,478
Location:
Prague, Czechia

Re: I am also getting the same error

mprothme wrote:

I am also currently running into this error. I've noticed that when I build this project in 32 bit mode (which I cannot do for production) that I don't get this error. Has this issue been addressed in a new release? Or how should I go about fixing this error?
This has been fixed in 5.1.3. What version are you using?

Reply with quote

Advertisement

You can post new topics in this forum