NullReferenceException when logging in to Vault

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

Moderator: SourceGear

Post Reply
aogbue
Posts: 9
Joined: Thu Aug 18, 2005 6:00 am
Location: Toronto, ON

NullReferenceException when logging in to Vault

Post by aogbue » Thu Feb 28, 2008 6:38 am

Hello,

I've suddenly begun to receive an error when trying to login to Vault from Visual Studio 2008.

An error has occurred. The message is:
Object reference not set to an instance of an object.

When using the Vault Client, I receive the message after selecting the repository that I wish to use.

I'm running Windows Vista Home Premium and Vault 4.1.0.16216 for both server and client. The Network Service user has full control on %Windir%\Temp\sgvault.

My log records the following:

----28-02-2008 07:17:14 --()-- System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - A system shutdown is in progress.)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean& marsCapable)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
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.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
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 VaultServiceSQL.VaultSqlConn.OpenConn()
at VaultServiceAPILib.VaultServiceAPISystem.GetOpenSqlConn(VaultSqlConn& conn) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean& marsCapable)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
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.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
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 VaultServiceSQL.VaultSqlConn.OpenConn()
at VaultServiceAPILib.VaultServiceAPISystem.GetOpenSqlConn(VaultSqlConn& conn)
----28-02-2008 07:23:23 sgvaultsystem--()--
System Started
Version 4.1.0.16216
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 = 4320
SGVault Working Directory = C:\Windows\Temp
SGVault Server URL =
Identity = NT AUTHORITY\NETWORK SERVICE
----28-02-2008 07:23:33 admin--fe80::7d25:5d36:480:95ee%8(fe80::7d25:5d36:480:95ee%8)--SSL Disabled Login
----28-02-2008 07:27:55 admin--fe80::7d25:5d36:480:95ee%8(fe80::7d25:5d36:480:95ee%8)--SSL Disabled Login
----28-02-2008 07:29:34 admin--fe80::7d25:5d36:480:95ee%8(fe80::7d25:5d36:480:95ee%8)--SSL Disabled Logout
----28-02-2008 07:29:34 admin--fe80::7d25:5d36:480:95ee%8(fe80::7d25:5d36:480:95ee%8)--SSL Disabled Login
----28-02-2008 07:33:30 admin--fe80::7d25:5d36:480:95ee%8(fe80::7d25:5d36:480:95ee%8)--SSL Disabled Login

Is there a solution to this problem?

Thanks.

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

Post by Beth » Thu Feb 28, 2008 1:37 pm

Are other users getting a similar error?
Can you start up Client Side Logging, recreate the scenario and post the relevant portions of both the server log and the client log that relate to your test?

aogbue
Posts: 9
Joined: Thu Aug 18, 2005 6:00 am
Location: Toronto, ON

Logging enabled

Post by aogbue » Thu Feb 28, 2008 9:45 pm

Hi.

I've enabled logging in Visual Studio 2008 by copying the contents of the appSettings element into devenv.exe.config and re-started VS.

I've set the following in the config file:
<add key="enableLogging" value="true" />
<add key="classesToLog" value="crypto" />

and have attached the resulting log to this post.

Oddly enough, however, the error is happening in a solution which has been set to "offline" mode. The error is occurring when I try to change its status to "Online" in the Vault Source Control dialog. When I open another project which is bound to source control and in "online" mode, I don't receive the error.
Attachments
VaultVsipClient2008.txt
VaultVsipClient2008.txt
(23.43 KiB) Downloaded 238 times

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

Post by Beth » Fri Feb 29, 2008 2:40 pm

Can we take the IDE out of the equation for a moment? How does just the Vault client alone hitting the Vault server work for you?? I'm not convinced quite yet that the initial error you posted has anything to do with VS 2008. The more things we can rule out the better.

Also, the client-side logging I'm looking for is with the regular Vault client. That can be started by opening Vault and pressing Ctrl-Alt-Shift-F12.

aogbue
Posts: 9
Joined: Thu Aug 18, 2005 6:00 am
Location: Toronto, ON

Vault GUI Logging

Post by aogbue » Tue Mar 04, 2008 6:11 am

Hi.

I've tried to enable logging by holding down Ctrl Alt Shift F12, but nothing seems to be happening. I've tried this just after starting the client, and just after logging in.

When I select the repository, I receive the same error message as the one in my first post.

I've enabled logging in C:\Program Files\SourceGear\Vault Client\VaultGUIClient.exe.config and selected "all" for the classesToLog attribute as stated in posts #5375 and 7806. Even after re-creating the error, however, there's no new log created in my %temp% folder. All I have is the VaultVsipClient2008.txt file.

Is there something else that I'm missing?

<add key="enableLogging" value="true" />
<add key="logFilePath" value="C:\Users\myusername\AppData\Local\Temp" />
<add key="classesToLog" value="all" />

aogbue
Posts: 9
Joined: Thu Aug 18, 2005 6:00 am
Location: Toronto, ON

Logging Finally Works

Post by aogbue » Wed Mar 05, 2008 1:10 am

Hi.

I've finally got the GUI client logging to work by removing the logging path from the config file.

I've re-created the error attached the log below.

Thanks.
Attachments
VaultGUIClient.txt
VaultGUIClient.txt
(21.78 KiB) Downloaded 228 times

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Wed Mar 05, 2008 10:49 am

The log file path needs to include a file name. So that's what was going on there.

It looks like you've got pending adds and deletes of the same files:

Code: Select all

05/03/2008 2:06:53 AM <mrd>: [GUIClientWorkerThread:7104] 	AddFile: $/footiefan/Bin/Recaptcha.dll.refresh
05/03/2008 2:06:53 AM <mrd>: [GUIClientWorkerThread:7104] 	DeleteFile: $/footiefan/Bin/Recaptcha.dll.refresh

05/03/2008 2:06:53 AM <mrd>: [GUIClientWorkerThread:7104] 	AddFile: $/footiefan/Bin/AjaxControlToolkit.dll.refresh
05/03/2008 2:06:53 AM <mrd>: [GUIClientWorkerThread:7104] 	DeleteFile: $/footiefan/Bin/AjaxControlToolkit.dll.refresh

05/03/2008 2:06:53 AM <mrd>: [GUIClientWorkerThread:7104] 	AddFile: $/footiefan/Bin/FredCK.FCKeditorV2.dll
05/03/2008 2:06:53 AM <mrd>: [GUIClientWorkerThread:7104] 	DeleteFile: $/footiefan/Bin/FredCK.FCKeditorV2.dll

05/03/2008 2:06:53 AM <mrd>: [GUIClientWorkerThread:7104] 	AddFile: $/footiefan/Bin/anoClassLibrary.dll
05/03/2008 2:06:53 AM <mrd>: [GUIClientWorkerThread:7104] 	DeleteFile: $/footiefan/Bin/anoClassLibrary.dll.refresh
Vault is obviously handling this badly, which we'll investigate. I'm curious how you got into this state. Did you recently upgrade from a 3.x version of Vault?

In any case, you can work around the issue by closing any open Vault clients and deleting CacheMember_ChangeSetItems from your client-side cache. Note that this will clear all the pended adds/deletes, so you'll need to re-add/re-delete those things you intended.
Ian Olsen
SourceGear

aogbue
Posts: 9
Joined: Thu Aug 18, 2005 6:00 am
Location: Toronto, ON

Upgraded from 3.X

Post by aogbue » Wed Mar 05, 2008 6:42 pm

Yes, I had upgraded from 3.X to 4.0.4 a while ago, and have just recently upgraded to 4.1.

The changes to my repository froze for some reason when I was trying to move folders from one subfolder to another. Afterwards, the folders were visible in both locations, but the ones in the original location were empty.

Later, I cloaked a few folders in my application (including /bin), and tried to remove the .dll.refresh files from the repository, and then the repository started to throw that error on subsequent logins.

Thanks, the workaround was successful and I'm now able to access the repository.

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

Post by Beth » Tue Mar 11, 2008 4:11 pm

Thanks for the follow up. Happy to hear you're working.

Post Reply