Topic "System.OverflowException in WinSCP.ConsoleCommStruct..ctor"

Author Message
zarkoh
[View user's profile]

Joined: 2012-06-14
Posts: 2
Location: Oslo
Following the C# example given at https://winscp.net/eng/docs/library#csharp

with the same standard SessionOptions configuration, I am getting the following

Error: System.OverflowException: Arithmetic operation resulted in an overflow.
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 ConsoleApplication1.Program.Main(String[] args) in ...\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs
:line 28

on session.Open(sessionOptions);

This basic attempt was made in a console application in VS 2012, targeting .NET 4 and using the latest dll and exe of WinSCP 5.0.7 beta.

Does anything obvious come to mind?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
I suppose you are using 64-bit OS, right?
https://msdn.microsoft.com/en-us/library/system.intptr.toint32.aspx

This bug has been added to the tracker:
https://winscp.net/tracker/show_bug.cgi?id=869
zarkoh
[View user's profile]

Joined: 2012-06-14
Posts: 2
Location: Oslo
Yes, using a 64-bit Windows 8 (Release Preview).

Trying on a different machine with the same OS I don't experience the issue, so it is probably some 32-bit vs. 64-bit combination of Visual Studio / solution / project target configuration that is causing the failure.

I'll report back if I manage to force it or bump into it again.

prikryl wrote:
I suppose you are using 64-bit OS, right?
https://msdn.microsoft.com/en-us/library/system.intptr.toint32.aspx

This bug has been added to the tracker:
https://winscp.net/tracker/show_bug.cgi?id=869
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