System.NyllReferenceException message

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
kevinjp
Posts: 6
Joined: Fri Jan 29, 2010 3:03 am

System.NyllReferenceException message

Post by kevinjp » Mon Jan 02, 2012 5:07 am

Hi there.

On my personal laptop, I have sourcegear vault and cruisecontrol .net set up for providing continuous integration builds for my personal projects.

Occasionally, a build will fail with the following exception and the only way to fix this is to restart the CruiseControl.NET service.

The error is as follows:

System.NullReferenceException: Object reference not set to an instance of an object.
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.VaultProClient.GetVaultClientFolder(String repositoryFolderPath, VaultClientFolder& vcf)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.VaultProClient.GetVersion(String repositoryFolderPath, String workingDir, Int64 folderVersion, Boolean useWorkingDir, Boolean deleteItemsThatAreNotInTheRepository)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.VaultProVaultSourceControl.GetSource(IIntegrationResult result)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.MultiSourceControl.GetSource(IIntegrationResult result)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Build(IIntegrationResult result)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)

I am running Vault Standard 5.1.2.19281, CruiseControl.NET 1.6.7981.1 and NAnt 0.91

The contents of the vault log at this point was as follows:


# SourceGear Vault Server
----01/01/2012 15:34:32 sgvaultsystem--()--
System Started
Version 5.1.2.19281
Cache Level = 1
DataBase Buffer Size (KB) = 256
LogFile Path = C:\Windows\Temp\sgvault
Log Level = Quiet
Archive Log = Weekly
ReverseDNS Lookup = True
Maximum HTTP Request Length = 102400
Overwrite Log on Startup = False
Session Timeout = 10080
SGVault Working Directory = C:\Windows\Temp
SGVault Server URL =
Identity = IIS APPPOOL\VaultAppPool
----01/01/2012 15:34:44 admin--::1(::1)--SSL Disabled Login
----01/01/2012 15:50:36 admin--::1(::1)--SSL Disabled Login
----01/01/2012 16:01:33 admin--::1(::1)--SSL Disabled Login
----01/01/2012 16:01:35 admin--::1(::1)--SSL Disabled Login
----01/01/2012 16:01:35 admin--::1(::1)--SSL Disabled System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.
at System.Data.SqlClient.SqlTransaction.ZombieCheck()
at System.Data.SqlClient.SqlTransaction.Commit()
at VaultServiceSQL.VaultSqlConn.CommitTransaction() at System.Data.SqlClient.SqlTransaction.ZombieCheck()
at System.Data.SqlClient.SqlTransaction.Commit()
at VaultServiceSQL.VaultSqlConn.CommitTransaction()
----01/01/2012 16:01:35 admin--::1(::1)--SSL Disabled Rolling Back a transaction at VaultServiceSQL.VaultSqlConn.RollbackTransaction()
at VaultServiceSQL.VaultSqlConn.CloseConn()
at VaultServiceAPILib.VaultServiceAPISystem.DoLogin(Boolean allowwebonlyusers, Boolean bAdminLogin, HttpSessionState hss, String strHostname, String strLogin, String strPassword, String strRMKey, String& strAuthToken, String strDomain)
at VaultServiceAPILib.VaultServiceAPISystem.DoLogin(Boolean allowwebonlyusers, Boolean bAdminLogin, HttpSessionState hss, String strHostname, String strLogin, String strPassword, String strRMKey, String& strAuthToken)
at VaultService.VaultService.Login(String strHostname, Boolean bUseFullFiles, String username, String strEncryptedPassword, String strRMKey, String& strAuthToken)
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at System.Web.Services.Protocols.WebServiceHandler.Invoke()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
at System.Web.Services.Protocols.SyncSessionlessHandler.ProcessRequest(HttpContext context)
at System.Web.Script.Services.ScriptHandlerFactory.HandlerWrapper.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

----01/01/2012 16:01:35 admin--::1(::1)--SSL Disabled System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.
at System.Data.SqlClient.SqlTransaction.ZombieCheck()
at System.Data.SqlClient.SqlTransaction.Rollback()
at VaultServiceSQL.VaultSqlConn.RollbackTransaction() at System.Data.SqlClient.SqlTransaction.ZombieCheck()
at System.Data.SqlClient.SqlTransaction.Rollback()
at VaultServiceSQL.VaultSqlConn.RollbackTransaction()
----01/01/2012 16:01:35 admin--::1(::1)--SSL Disabled Login
----01/01/2012 16:20:36 sgvaultsystem--()--
System Started
Version 5.1.2.19281
Cache Level = 1
DataBase Buffer Size (KB) = 256
LogFile Path = C:\Windows\Temp\sgvault
Log Level = Quiet
Archive Log = Weekly
ReverseDNS Lookup = True
Maximum HTTP Request Length = 102400
Overwrite Log on Startup = False
Session Timeout = 10080
SGVault Working Directory = C:\Windows\Temp
SGVault Server URL =
Identity = IIS APPPOOL\VaultAppPool
----01/01/2012 16:31:35 admin--::1(::1)--SSL Disabled Login
----01/01/2012 16:31:35 admin--::1(::1)--SSL Disabled Login
----01/01/2012 16:36:54 admin--::1(::1)--SSL Disabled Login
----01/01/2012 16:38:34 admin--::1(::1)--SSL Disabled Logout
----01/01/2012 16:41:32 admin--::1(::1)--SSL Disabled Login
----01/01/2012 16:55:56 --()-- Vault Failed to establish a connection to the database.
----02/01/2012 10:09:37 sgvaultsystem--()--
System Started
Version 5.1.2.19281
Cache Level = 1
DataBase Buffer Size (KB) = 256
LogFile Path = C:\Windows\Temp\sgvault
Log Level = Quiet
Archive Log = Weekly
ReverseDNS Lookup = True
Maximum HTTP Request Length = 102400
Overwrite Log on Startup = False
Session Timeout = 10080
SGVault Working Directory = C:\Windows\Temp
SGVault Server URL =
Identity = IIS APPPOOL\VaultAppPool
----02/01/2012 10:09:41 admin--::1(::1)--SSL Disabled Login
----02/01/2012 10:10:39 admin--::1(::1)--SSL Disabled Logout
----02/01/2012 10:10:50 admin--::1(::1)--SSL Disabled Login
----02/01/2012 10:33:18 admin--::1(::1)--SSL Disabled Login
----02/01/2012 10:33:21 admin--::1(::1)--SSL Disabled Login
----02/01/2012 10:33:21 admin--::1(::1)--SSL Disabled System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.
at System.Data.SqlClient.SqlTransaction.ZombieCheck()
at System.Data.SqlClient.SqlTransaction.Commit()
at VaultServiceSQL.VaultSqlConn.CommitTransaction() at System.Data.SqlClient.SqlTransaction.ZombieCheck()
at System.Data.SqlClient.SqlTransaction.Commit()
at VaultServiceSQL.VaultSqlConn.CommitTransaction()
----02/01/2012 10:33:21 admin--::1(::1)--SSL Disabled Rolling Back a transaction at VaultServiceSQL.VaultSqlConn.RollbackTransaction()
at VaultServiceSQL.VaultSqlConn.CloseConn()
at VaultServiceAPILib.VaultServiceAPISystem.DoLogin(Boolean allowwebonlyusers, Boolean bAdminLogin, HttpSessionState hss, String strHostname, String strLogin, String strPassword, String strRMKey, String& strAuthToken, String strDomain)
at VaultServiceAPILib.VaultServiceAPISystem.DoLogin(Boolean allowwebonlyusers, Boolean bAdminLogin, HttpSessionState hss, String strHostname, String strLogin, String strPassword, String strRMKey, String& strAuthToken)
at VaultService.VaultService.Login(String strHostname, Boolean bUseFullFiles, String username, String strEncryptedPassword, String strRMKey, String& strAuthToken)
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at System.Web.Services.Protocols.WebServiceHandler.Invoke()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
at System.Web.Services.Protocols.SyncSessionlessHandler.ProcessRequest(HttpContext context)
at System.Web.Script.Services.ScriptHandlerFactory.HandlerWrapper.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

----02/01/2012 10:33:21 admin--::1(::1)--SSL Disabled System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.
at System.Data.SqlClient.SqlTransaction.ZombieCheck()
at System.Data.SqlClient.SqlTransaction.Rollback()
at VaultServiceSQL.VaultSqlConn.RollbackTransaction() at System.Data.SqlClient.SqlTransaction.ZombieCheck()
at System.Data.SqlClient.SqlTransaction.Rollback()
at VaultServiceSQL.VaultSqlConn.RollbackTransaction()
----02/01/2012 10:33:21 admin--::1(::1)--SSL Disabled Login
----02/01/2012 10:33:32 admin--::1(::1)--SSL Disabled Rolling Back a transaction at VaultServiceSQL.VaultSqlConn.RollbackTransaction()
at VaultServiceAPILib.VaultServiceAPI.AddLabel(Int32 nUserID, Int32 nRepID, VaultLabelItem& vLabel)
at VaultService.VaultService.AddLabel(Int32 nRepID, VaultLabelItem& vLabel)
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at System.Web.Services.Protocols.WebServiceHandler.Invoke()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
at System.Web.Services.Protocols.SyncSessionlessHandler.ProcessRequest(HttpContext context)
at System.Web.Script.Services.ScriptHandlerFactory.HandlerWrapper.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

----02/01/2012 10:33:32 admin--::1(::1)--SSL Disabled AddLabel returned: FailDuplicateLabel
----02/01/2012 10:37:32 admin--::1(::1)--SSL Disabled Login
----02/01/2012 10:38:11 admin--::1(::1)--SSL Disabled Logout
----02/01/2012 10:38:17 admin--::1(::1)--SSL Disabled Login
----02/01/2012 10:38:51 admin--::1(::1)--SSL Disabled Logout
----02/01/2012 10:41:56 admin--::1(::1)--SSL Disabled Login
----02/01/2012 10:54:28 admin--::1(::1)--SSL Disabled Login
----02/01/2012 10:59:38 admin--::1(::1)--SSL Disabled Logout
----02/01/2012 10:59:38 admin--::1(::1)--SSL Disabled Logout
----02/01/2012 10:59:38 admin--::1(::1)--SSL Disabled Logout
----02/01/2012 10:59:49 admin--::1(::1)--SSL Disabled Login

The references to the build on 02/01/2012 are when the error occurred.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: System.NyllReferenceException message

Post by Beth » Mon Jan 02, 2012 10:35 am

Could I have you put your Vault Server Log into debug logging? Then recreate the scenario.

Could you then zip up and send the entire sgvault.log to support at sourcegear.com (attn: Beth) with a link to this forum thread.
Beth Kieler
SourceGear Technical Support

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: System.NyllReferenceException message

Post by Beth » Mon Jan 02, 2012 4:26 pm

In addition to the last email, do you have queues set up in CC.NET?
Beth Kieler
SourceGear Technical Support

kevinjp
Posts: 6
Joined: Fri Jan 29, 2010 3:03 am

Re: System.NyllReferenceException message

Post by kevinjp » Wed Jan 04, 2012 2:35 pm

Hi Beth.

I have just re-created this exception with sourcegear vault logging in debug mode.

I have sent you an email with the vault log attached.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: System.NyllReferenceException message

Post by Beth » Wed Jan 04, 2012 4:18 pm

I've received your email and responded.

HS: 224598
Beth Kieler
SourceGear Technical Support

Post Reply