Crashing on first run every time

shadowbobshadowbob Posts: 71 Bronze 2
edited April 18, 2008 12:47PM in SQL Multi Script
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?
Jeremy Fuller
VP, Software Development
Organizational Intelligence, Inc.

Comments

  • Hi,

    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
    Robert Chipperfield
    Red Gate
  • shadowbobshadowbob Posts: 71 Bronze 2
    Good catch. I'm running .NET 3.5, which includes all the latest official servicing updates to the .NET stack. However, the hotfix is dated Feb 2008, which is after the 3.5 release.

    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?
    Jeremy Fuller
    VP, Software Development
    Organizational Intelligence, Inc.
  • Hi,

    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
    Robert Chipperfield
    Red Gate
  • shadowbobshadowbob Posts: 71 Bronze 2
    I realized this morning that one difference in this install (which is crashing) is that I had cranked the "Databases to execute against simultaneously" setting up to 7 (since I have a 7-database queue normally). I turned it down to 4 and didn't get a crash this morning. I'll keep trying to see if it crashes, but I think that was the issue. Hope it helps.
    Jeremy Fuller
    VP, Software Development
    Organizational Intelligence, Inc.
Sign In or Register to comment.