Object reference not set to an instance of an object.

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

Moderator: SourceGear

Post Reply
Nihimon
Posts: 68
Joined: Wed Sep 12, 2007 1:23 pm

Object reference not set to an instance of an object.

Post by Nihimon » Thu Mar 27, 2008 10:27 am

I receive this NullReferenceException on starting the Vault Client on my local computer.

I'm able to log in as the same user on another computer with no problems.

I'm running the latest versions:

[3/27/2008 11:22:28 AM] Version Check: This Vault client is version 4.1.0.16216
[3/27/2008 11:22:28 AM] Version Check: Your Vault server is version 4.1.0.16216
[3/27/2008 11:22:28 AM] Version Check: The following information was retrieved from the SourceGear website. No information was sent to SourceGear. You can disable this part of the version check from the Options dialog.
[3/27/2008 11:22:28 AM] Version Check: The most recent Vault release is version 4.1.0.16216


I turned on Debug logging on the Server, but didn't see anything unusual. The relevant section is after the server start around 9:30 this morning, and login attempts for "mattk". Here is the entire section of the log file during Debug logging:

System Started
Version 4.1.0.16216
Cache Level = 1
DataBase Buffer Size (KB) = 256
LogFile Path = C:\WINDOWS\Temp\sgvault
Log Level = Debug
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
----3/27/2008 9:41:22 AM --()-- Beginning SQL transaction 55530882
----3/27/2008 9:41:22 AM --()-- SQL transaction 55530882 successfully committed.
----3/27/2008 9:41:22 AM --()-- Beginning SQL transaction 30015890
----3/27/2008 9:41:22 AM --()-- SQL transaction 30015890 successfully committed.
----3/27/2008 9:41:25 AM mattk--86pgmr11.lacksvalley.com(192.168.85.85)--SSL Disabled Beginning SQL transaction 62284798
----3/27/2008 9:41:26 AM mattk--86pgmr11.lacksvalley.com(192.168.85.85)--SSL Disabled SQL transaction 62284798 successfully committed.
----3/27/2008 9:41:26 AM mattk--86pgmr11.lacksvalley.com(192.168.85.85)--SSL Disabled Login
----3/27/2008 9:41:26 AM mattk--86pgmr11.lacksvalley.com(192.168.85.85)--SSL Disabled GetUserList returned: Success
----3/27/2008 9:41:26 AM mattk--86pgmr11.lacksvalley.com(192.168.85.85)--SSL Disabled GetUserOptions returned: Success
----3/27/2008 9:41:26 AM mattk--86pgmr11.lacksvalley.com(192.168.85.85)--SSL Disabled Success
----3/27/2008 9:41:26 AM mattk--86pgmr11.lacksvalley.com(192.168.85.85)--SSL Disabled GetRepositories returned: Success
----3/27/2008 9:42:08 AM mattk--86pgmr11.lacksvalley.com(192.168.85.85)--SSL Disabled Logout
----3/27/2008 9:42:08 AM --()-- Beginning SQL transaction 66228199
----3/27/2008 9:42:08 AM --()-- SQL transaction 66228199 successfully committed.
----3/27/2008 9:42:38 AM admin--86pgmr11.lacksvalley.com(192.168.85.85)--SSL Disabled Beginning SQL transaction 46228029
----3/27/2008 9:42:38 AM admin--86pgmr11.lacksvalley.com(192.168.85.85)--SSL Disabled SQL transaction 46228029 successfully committed.
----3/27/2008 9:42:38 AM admin--86pgmr11.lacksvalley.com(192.168.85.85)--SSL Disabled Login
----3/27/2008 9:43:37 AM sgvaultsystem--()--


I will try repairing the installation...

Matt Knowles

Nihimon
Posts: 68
Joined: Wed Sep 12, 2007 1:23 pm

Later...

Post by Nihimon » Thu Mar 27, 2008 10:53 am

Repairing the installation didn't work.

Uninstalling, rebooting, and reinstalling didn't fix it.

For what it's worth, the NullReferenceException isn't thrown until after I select the "Initial Repository."

I would turn on client-side logging, but I'm not sure how and haven't found a post in the Knowledge Base or here detailing how.

Matt Knowles

Nihimon
Posts: 68
Joined: Wed Sep 12, 2007 1:23 pm

Later still...

Post by Nihimon » Thu Mar 27, 2008 11:07 am

Ok, I found how to turn on client-side logging and produced the attached file.

This seems to be related to another post

http://support.sourcegear.com/viewtopic.php?t=9761

and probably related to my previous post

http://support.sourcegear.com/viewtopic.php?t=9829

So, I understand I need to be more careful adding and deleting files.

But what can I do now to get Vault working again without losing my work. Is it safe for me to delete CacheMember_ChangeSetItems?
Attachments
VaultGUIClient.txt
(7.34 KiB) Downloaded 185 times

Nihimon
Posts: 68
Joined: Wed Sep 12, 2007 1:23 pm

And finally...

Post by Nihimon » Thu Mar 27, 2008 11:20 am

Ok, after reading up on the ChangeSetItems cache file, I felt confident enough to go ahead and delete it. I'm working againg.

For what it's worth, I didn't ever upgrade from a 3.x Vault, like the other user did. I started with Vault 4.0.

I believe this simply happened when I added a file, then deleted that file before ever checking anything in. I'm not sure how Vault knows what order to apply those kinds of changes in, but I'm guessing it's not based on the time of the change.

I think I may understand this a little bit and would suggest the following fix: When adding a "Delete" change to the ChangeSetItems cache file, first scan to see if there's a pending "Create" for the same file, and if so, instead of adding the Delete change, simply remove the Create change.

Hope this is helpful, and I'm glad I was able to do a little searching and find all the information I needed to solve the problem already here in the forums.

Thanks,
Matt Knowles

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

Post by Beth » Thu Mar 27, 2008 5:23 pm

Happy you found everything so quickly. If users are finding things in the forum easily, then it's doing it's job. Thanks for the updates though on how things were going as I'm sure this will help some future user.

Post Reply