Command Line Null Reference Exception

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

Moderator: SourceGear

stephn
Posts: 11
Joined: Tue Nov 29, 2005 9:43 am

Command Line Null Reference Exception

Post by stephn » Tue Nov 29, 2005 9:57 am

I'm attempting a command line get for the first time and am accessing a server which resides in another state via IP address. I'm getting a Common Language Runtime Debugging Services error popup saying "Application has generated an exception that could not be handled." When I acknowledge that popup, I get the following:

Unhandled Exception: System.NullReferenceException": Object reference not set to an instance of an object.
at VaultClientNetLib.VaultConnection.Logout()
at VaultClientOperationsLib.ClientInstance.Logout()
at VaultCmdLineClient.VaultCmdLineClient.Logout(Boolean bForceLogout)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)

I'm using Version 3.1.5.3546.
I can connect successfully using the GUI.
I do not see any errors in the logs.

The exact command I'm using is:
"s:\program files\SourceGear\Vault Client\vault.exe" get -user "xxxx" -password "xxxx" -host xx.xx.xx.xx -repository "AS BASE POS" -destpath "s:\Base2" $/Base

Can anyone help, please?

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Tue Nov 29, 2005 10:49 am

The command line client does support specifying an IP address. When you connect via the GUI client, do you use the same IP address?

You might try turning on client logging (see the knowledge base) and seeing whether it outputs an error that is more useful.

Additionally, the source code for the command line client is available if you have the aptitude to run it through a debugger on your end to see exactly the error is happening.

stephn
Posts: 11
Joined: Tue Nov 29, 2005 9:43 am

command line logging

Post by stephn » Tue Nov 29, 2005 1:44 pm

In Knowledge Base, I see information on turning on logging for Windows Forms Client, Shadow Folder, Visual Studio .NET, Visual C++ 6 amd VB 6. Which config file applies for command line clients?

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Tue Nov 29, 2005 2:01 pm

Hmmm. Looks like we need to update the KB article.

It follows the pattern of [exe name].config, so the file should be called vault.exe.config

stephn
Posts: 11
Joined: Tue Nov 29, 2005 9:43 am

log attached

Post by stephn » Tue Nov 29, 2005 2:13 pm

The resulting log is attached. It doesn't tell me anything new. Does it you?

By the way, when I connect via the GUI, I do use the IP address, just as I do in the command line.

Thank you. I appreciate your quick responses.
Attachments
SVclient.txt
(0 Bytes) Downloaded 658 times

stephn
Posts: 11
Joined: Tue Nov 29, 2005 9:43 am

The attachment

Post by stephn » Tue Nov 29, 2005 2:16 pm

Hopefully this attachment will work...
Attachments
SVclient.txt
(1.54 KiB) Downloaded 780 times

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Tue Nov 29, 2005 2:45 pm

The log file only reveals that login is failing.

Are you using a proxy with the GUI client? If so, you'd need to specify a proxy for the command line client as well.

Can you tell whether the problem is the IP address or whether a fully qualified URL fails as well?

stephn
Posts: 11
Joined: Tue Nov 29, 2005 9:43 am

ip address

Post by stephn » Tue Nov 29, 2005 3:10 pm

We are not using a proxy in the GUI.

I am making an assumption that the IP should work in the command line if it works in the GUI, which it does. I am now trying to get the exact URL and will try that to confirm. Would you expect such a difference possible between the GUI and the command line?

stephn
Posts: 11
Joined: Tue Nov 29, 2005 9:43 am

no URL

Post by stephn » Wed Nov 30, 2005 11:32 am

Unfortunately, there is no URL to the Vault Server, but the IP address works every time from the GUI.

Do you have any other suggestions of what we can do to find the problem?

dronad
Posts: 9
Joined: Tue Jul 12, 2005 3:02 pm

Demo mode?

Post by dronad » Wed Nov 30, 2005 1:00 pm

I have the same problem ... just upgraded to 3.1 and getting null reference when using the command line client.

I am in "demo" mode ... no serial number entered yet ... should the command line client work in demo mode?

David

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Wed Nov 30, 2005 1:14 pm

Yes, the CLC should work in demo mode.

Are you getting null references on login, or on some other operation?

Also, which version did you upgrade from?

dronad
Posts: 9
Joined: Tue Jul 12, 2005 3:02 pm

failing on Vault LISTUSERS

Post by dronad » Wed Nov 30, 2005 1:26 pm

The command i tried was:

vault LISTUSERS -host xxx -user xyz -password abc

and I get

Unhandled Exception: System.NullReferenceException": Object reference not set to an instance of an object.
at VaultClientNetLib.VaultConnection.Logout()
at VaultClientOperationsLib.ClientInstance.Logout()
at VaultCmdLineClient.VaultCmdLineClient.Logout(Boolean bForceLogout)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)

just like the prior poster ...

David

(and like the other stephn, i can connect with gui client to same host no problem)

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Nov 30, 2005 2:00 pm

David,

Send me an email using the button below this post with your phone number. I'd like to ask you some more questions.

-Jeremy

stephn
Posts: 11
Joined: Tue Nov 29, 2005 9:43 am

resolution?

Post by stephn » Wed Nov 30, 2005 2:56 pm

If you have some resolution to the problem, please post it. I'm making no progress here.

Thank you.

dronad
Posts: 9
Joined: Tue Jul 12, 2005 3:02 pm

working

Post by dronad » Wed Nov 30, 2005 3:17 pm

We downloaded (with jeremy help) and built the Client API which will create a command line client ... after it was built, it works, so the presumtion is the shipped command line client that came with the latest build may be corrupted somehow.

david

Post Reply