none
JIT Debbuging RRS feed

  • Question

  • When I run my executable I get the following error

    See the end of this message for more details on how to invoke debugging Just-In-Time (JIT) instead of this dialog box.

    System.OverflowException: The arithmetic operation has caused an overflow.

    in System.Data.ProviderBase.TimeoutTimer.StartMillisecondsTimeout(Int64 milliseconds)
    in System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
    in System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
       in System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
       in System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
       in System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
       in System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
       in System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
       in System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
       in System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
       in System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       in System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       in System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       in System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
       in System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
       in System.Data.SqlClient.SqlConnection.Open()
       in Reporte_de_Existencias_REPS.Form1.Form1_Load(Object sender, EventArgs e)
       in System.EventHandler.Invoke(Object sender, EventArgs e)
       in System.Windows.Forms.Form.OnLoad(EventArgs e)
       in System.Windows.Forms.Form.OnCreateControl()
       in System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       in System.Windows.Forms.Control.CreateControl()
       in System.Windows.Forms.Control.WmShowWindow(Message& m)
       in System.Windows.Forms.Control.WndProc(Message& m)
       in System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       in System.Windows.Forms.ContainerControl.WndProc(Message& m)
       in System.Windows.Forms.Form.WmShowWindow(Message& m)
       in System.Windows.Forms.Form.WndProc(Message& m)
       in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    How can I solve the previous error?

    Thanks in advance.

    Regards.



    Thursday, November 2, 2017 10:48 PM

All replies

  • Hello,

    It would be great if you can indicate the line of code throwing the runtime exception. Seems like it's with interacting with an SQL-Server database but we can't assist without the context of code and the exact line causing the exception.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Thursday, November 2, 2017 11:29 PM
    Moderator
  • How can I solve the previous error?

    You can read the dump in reverse sequence to get an idea of where the problem is, using a bit of filtering.

      in Reporte_de_Existencias_REPS.Form1.Form1_Load(Object sender, EventArgs e)
      in System.Data.SqlClient.SqlConnection.Open()
      in System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)

    So it looks like a timeout failure in attempting to make the DB connection.    You will usually get better diagnostic information if the code is not in the form Load event.  The form Shown event is probably suitable, or you could temporarily put the code in a button click event, so the user has to make the connection after the form is loaded.

    Thursday, November 2, 2017 11:41 PM