Topic "Arithmetic Overflow"

Author Message
RedJungle
[View user's profile]

Joined: 2012-11-18
Posts: 4
Location: Napier, New Zealand
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:




Quote:
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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
I'll contact you soon.
_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Thanks for your report.
I have sent you an email with source code to address you have used to register on this forum.
Gophrntz
[View user's profile]

Joined: 2012-12-26
Posts: 1
prikryl 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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
This bug has been added to the tracker:
https://winscp.net/tracker/show_bug.cgi?id=960
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
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.
devoured
[View user's profile]

Joined: 2014-04-17
Posts: 1
I am seeing this error as well when attempting to open a session. How can I work around this issue?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
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.
_________________
Martin Prikryl
mprothme
[View user's profile]

Joined: 2015-11-02
Posts: 2
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!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
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?
mprothme
[View user's profile]

Joined: 2015-11-02
Posts: 2
We were using an older version. We downloaded the newest dll and exe and now we don't have any problems.

Thanks for the help.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License