Crashing on first run every time
shadowbob
Posts: 71 Bronze 2
This is really strange. For the last several weeks, the following has been happening. The first time I boot up and run Multi Script, put in one script, and hit Execute Now, the program crashes with this exception:
SQL Multi Script 1.1.0.34
Index was outside the bounds of the array.
IndexOutOfRangeException
at SNINativeMethodWrapper.SNISecGenClientContext(SafeHandle pConnectionObject, Byte[] inBuff, UInt32 receivedLength, Byte[] OutBuff, UInt32& sendLength, Byte[] serverUserName)
at System.Data.SqlClient.TdsParser.SNISSPIData(Byte[] receivedBuff, UInt32 receivedLength, Byte[] sendBuff, UInt32& sendLength)
at System.Data.SqlClient.TdsParser.TdsLogin(SqlLogin rec)
at System.Data.SqlClient.SqlInternalConnectionTds.Login(Int64 timerExpire, String newPassword)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at RedGate.SQLMultiScript.Engine.Engine.b.a(Engine )
at RedGate.SQLMultiScript.Engine.Engine.a(Object )
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
So I close Multi Script and run it again. I put in the same script and hit Execute Now again. And it always works the second time. This is incredibly repeatable on my system -- literally the first run of Multi Script always crashes, and the second and subsequent runs work correctly.
I'm running Windows Vista Ultimate. Any thoughts?
SQL Multi Script 1.1.0.34
Index was outside the bounds of the array.
IndexOutOfRangeException
at SNINativeMethodWrapper.SNISecGenClientContext(SafeHandle pConnectionObject, Byte[] inBuff, UInt32 receivedLength, Byte[] OutBuff, UInt32& sendLength, Byte[] serverUserName)
at System.Data.SqlClient.TdsParser.SNISSPIData(Byte[] receivedBuff, UInt32 receivedLength, Byte[] sendBuff, UInt32& sendLength)
at System.Data.SqlClient.TdsParser.TdsLogin(SqlLogin rec)
at System.Data.SqlClient.SqlInternalConnectionTds.Login(Int64 timerExpire, String newPassword)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at RedGate.SQLMultiScript.Engine.Engine.b.a(Engine )
at RedGate.SQLMultiScript.Engine.Engine.a(Object )
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
So I close Multi Script and run it again. I put in the same script and hit Execute Now again. And it always works the second time. This is incredibly repeatable on my system -- literally the first run of Multi Script always crashes, and the second and subsequent runs work correctly.
I'm running Windows Vista Ultimate. Any thoughts?
Jeremy Fuller
VP, Software Development
Organizational Intelligence, Inc.
VP, Software Development
Organizational Intelligence, Inc.
Comments
Sorry you're seeing this - it's not something we've seen before, but searching around, it looks like you've hit this problem: http://support.microsoft.com/kb/948176. Unfortunately it seems like you need to contact Microsoft in order to obtain the hotfix; there isn't a download link for it that I can see.
The article does mention that it will be fixed in the "next service pack" of the .NET framework - do you have .NET 2.0 SP1 installed? If not, maybe installing that will help.
[Edit: I've raised this in our bug tracking system (SE-600), so hopefully the next release should contain a fix for this as well]
Hope that helps,
Robert
Red Gate
It's interesting that I never saw this issue on Vista SP0, but I recently installed a fresh copy of Vista with SP1 and that's roughly when the issue started.
Well, it's pretty annoying, but I'm okay pinning the blame on Microsoft for now. No other customers are seeing this?
VP, Software Development
Organizational Intelligence, Inc.
We've given this a go on a couple of Vista SP1 machines this morning, but haven't been able to reproduce it, unfortunately. Hopefully we can put in a fix to work around this next release, but I can't say when that'll be at this time.
Regards,
Robert
Red Gate
VP, Software Development
Organizational Intelligence, Inc.