NullReference exception in VS2003 and VS2005 using Vault
Moderator: SourceGear
NullReference exception in VS2003 and VS2005 using Vault
I have been using Vault with VS2005 for a while now with no issues. Recently while on idle or at some other seemingly random time VS crashes. When debugging it I have this call stack. It looks like an exception is thrown out of the Vault lib. The only thing that I can think of that changed in my pc configuration is the installation of VS2008. From the looks of the call stack, I do not see how they are related.
My VS crashes multiple times a day because of that. The standalone Vault client works fine all the time.
SourceGear Vault Client is version 3.0.6
VaultClientOperationsLib.dll is version 3.0.6.2856
> System.dll!System.IO.FileSystemEventArgs.FileSystemEventArgs(System.IO.WatcherChangeTypes changeType, string directory = null, string name = null) + 0x21 bytes
VaultClientOperationsLib.dll!VaultClientOperationsLib.ClientInstance.RenamedEventHandler(object source = {System.IO.FileSystemWatcher}, System.IO.RenamedEventArgs e) + 0x80 bytes
System.dll!System.IO.FileSystemWatcher.OnRenamed(System.IO.RenamedEventArgs e) + 0x80 bytes
System.dll!System.IO.FileSystemWatcher.NotifyRenameEventArgs(System.IO.WatcherChangeTypes action, string name, string oldName) + 0x55 bytes
System.dll!System.IO.FileSystemWatcher.CompletionStatusChanged(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* overlappedPointer = 0x02731028) + 0x265 bytes
mscorlib.dll!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* pOVERLAP) + 0x60 bytes
[Appdomain Transition]
This call stack is from VS2008 crashing. It is the same for VS2003.
My VS crashes multiple times a day because of that. The standalone Vault client works fine all the time.
SourceGear Vault Client is version 3.0.6
VaultClientOperationsLib.dll is version 3.0.6.2856
> System.dll!System.IO.FileSystemEventArgs.FileSystemEventArgs(System.IO.WatcherChangeTypes changeType, string directory = null, string name = null) + 0x21 bytes
VaultClientOperationsLib.dll!VaultClientOperationsLib.ClientInstance.RenamedEventHandler(object source = {System.IO.FileSystemWatcher}, System.IO.RenamedEventArgs e) + 0x80 bytes
System.dll!System.IO.FileSystemWatcher.OnRenamed(System.IO.RenamedEventArgs e) + 0x80 bytes
System.dll!System.IO.FileSystemWatcher.NotifyRenameEventArgs(System.IO.WatcherChangeTypes action, string name, string oldName) + 0x55 bytes
System.dll!System.IO.FileSystemWatcher.CompletionStatusChanged(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* overlappedPointer = 0x02731028) + 0x265 bytes
mscorlib.dll!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* pOVERLAP) + 0x60 bytes
[Appdomain Transition]
This call stack is from VS2008 crashing. It is the same for VS2003.
This could take some digging. Vault 3.0.x is not support with VS 2008, VS 2005, nor the 2.0 or higher.NET framework. Maybe with additional information we might be able tell what exactly caused the problem.
Does anyone else have this issue?
Some IDE Logging might tell us more.
Can you give more detail?
Does anyone else have this issue?
Some IDE Logging might tell us more.
Can you give more detail?
I have turn on both loggings and I couldn’t find anything in there that hints what the problem is. I could send you the files if you want.
However, from the call log you can see that the call doesn't originate from the IDE but from the file OS. An instance of FileWatcher dispatches events when there are file changes on the drive. In this case it looks like the event is on (file) rename. There are two parameters that are passed along with the event - old and new name. For some reason one of the name parameters is null. The code that handles that event is in VaultClientOperationsLib.ClientInstance.RenamedEventHandler method. It apparently tries to extract the directory name out of the file name and the result is null. This method doesn't seem to handle the case when name is null and the directory is null and as result exception is thrown. Unfortunately this exception brings the IDE down.
However, from the call log you can see that the call doesn't originate from the IDE but from the file OS. An instance of FileWatcher dispatches events when there are file changes on the drive. In this case it looks like the event is on (file) rename. There are two parameters that are passed along with the event - old and new name. For some reason one of the name parameters is null. The code that handles that event is in VaultClientOperationsLib.ClientInstance.RenamedEventHandler method. It apparently tries to extract the directory name out of the file name and the result is null. This method doesn't seem to handle the case when name is null and the directory is null and as result exception is thrown. Unfortunately this exception brings the IDE down.
-
- Posts: 28
- Joined: Tue Feb 17, 2004 7:42 am
- Location: UK
- Contact:
Re: NullReference exception in VS2003 and VS2005 using Vault
I'm also having this problem with Vault 4.1.1. It crashes both Vault GUI Client and Visual Studio at almost exactly the same time. The problem occurs when Windows Search starts indexing.
I also have a fairly large number of working folders - 40 or so. Frequently changes aren't picked up by the Pending Change Set pane.
Looking at my CacheMember_WorkingFolderAssignments file, I noticed that a working folder for one repository folder was set to C:\. This could explain a lot of problems if all changes on drive C: are being monitored! The most recent crash I had was referring to a Windows Search temporary file under Documents and Settings supposedly being renamed (but the new name was null).
I've removed this assignment and will see if this resolves the problem.
I also have a fairly large number of working folders - 40 or so. Frequently changes aren't picked up by the Pending Change Set pane.
Looking at my CacheMember_WorkingFolderAssignments file, I noticed that a working folder for one repository folder was set to C:\. This could explain a lot of problems if all changes on drive C: are being monitored! The most recent crash I had was referring to a Windows Search temporary file under Documents and Settings supposedly being renamed (but the new name was null).
I've removed this assignment and will see if this resolves the problem.
Re: NullReference exception in VS2003 and VS2005 using Vault
Mike Dimmick: It sounds like your case could be more than one issue. To start, you should upgrade to 4.1.4 to make sure you have all the latest fixes.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: NullReference exception in VS2003 and VS2005 using Vault
Hi,
I'm also periodically getting similar errors in VS2008 and the Vault Client.
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="System"
StackTrace:
at System.IO.FileSystemEventArgs..ctor(WatcherChangeTypes changeType, String directory, String name)
at VaultClientOperationsLib.ClientInstance.RenamedEventHandler(Object source, RenamedEventArgs e)
at System.IO.FileSystemWatcher.OnRenamed(RenamedEventArgs e)
at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
As with Mike Dimmick's post, the root working folder is C:\
I'm the only one on my team getting these errors and also the only one using the CVS style (so far).
We're using Vault 4.1.4.18402.
Is this a known problem?
Are there any work arounds?
thanks
A
I'm also periodically getting similar errors in VS2008 and the Vault Client.
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="System"
StackTrace:
at System.IO.FileSystemEventArgs..ctor(WatcherChangeTypes changeType, String directory, String name)
at VaultClientOperationsLib.ClientInstance.RenamedEventHandler(Object source, RenamedEventArgs e)
at System.IO.FileSystemWatcher.OnRenamed(RenamedEventArgs e)
at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
As with Mike Dimmick's post, the root working folder is C:\
I'm the only one on my team getting these errors and also the only one using the CVS style (so far).
We're using Vault 4.1.4.18402.
Is this a known problem?
Are there any work arounds?
thanks
A
Re: NullReference exception in VS2003 and VS2005 using Vault
Where was the working folder set at? By that, I mean did you set it using the Vault GUI client, or is it showing as set that way in Visual Studio?
Are you using the Vault Enhanced Client or the Vault Classic Client? That information is found in VS Tools - Options - Source Control - Plug In.
What type of project is it?
Where is your .sln file located at?
Are you using the Vault Enhanced Client or the Vault Classic Client? That information is found in VS Tools - Options - Source Control - Plug In.
What type of project is it?
Where is your .sln file located at?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: NullReference exception in VS2003 and VS2005 using Vault
Hi,
Apologies for the slow response.
Working folder was set in the GUI client ($/ is set to C:\ with force inherit on) and I'm using the enhanced client in VS, but it happens for both VS (web and windows solutions) and also the GUI client itself.
The solution files are located in a second level directory so c:\dir1\dir2\mySolution.sln.
All projects are in third level directories so c:\dir1\dir2\myProjectDir\myPrj.csproj etc...
Thanks
A
Apologies for the slow response.
Working folder was set in the GUI client ($/ is set to C:\ with force inherit on) and I'm using the enhanced client in VS, but it happens for both VS (web and windows solutions) and also the GUI client itself.
The solution files are located in a second level directory so c:\dir1\dir2\mySolution.sln.
All projects are in third level directories so c:\dir1\dir2\myProjectDir\myPrj.csproj etc...
Thanks
A
Re: NullReference exception in VS2003 and VS2005 using Vault
Error just happened again.
I had one instance of VS2005 open, 2 of VS2008 and the GUI client. All crashed.
The following is from VaultVsipClient.txt (let me know if I should upload the whole file)
04-May-2010 16:41:19 <generic>: [<No Name>:5968] [System.NullReferenceException: Object reference not set to an instance of an object.
at VaultClientOperationsLib.WorkingFolder.GetHiddenFolderName(ClientInstance ci, String folderName)
at VaultClientOperationsLib.WorkingFolder.GetHiddenFolderName()
at VaultClientOperationsLib.WorkingFolder.GetHiddenStateFilename()
at VaultClientOperationsLib.WorkingFolder.LoadState()
at VaultClientOperationsLib.WorkingFolder..ctor(ClientInstance ci, String diskFolderPath, Boolean makeBackups)
at VaultClientOperationsLib.ClientInstance.FindOrCreateWorkingFolder(String diskPath, Boolean makeBackups)
at VaultClientOperationsLib.ClientInstance.GetWorkingFolder(String strWorkingFolder, Boolean bMakeBackups)
at VaultClientOperationsLib.ClientInstance.UpdateKnownChanges_Folder(VaultClientFolder folder, Hashtable alreadySearchedFolderPaths, Boolean recursive)
at VaultClientOperationsLib.ClientInstance.UpdateKnownChanges_All(Boolean notifyChangeSetItemsChanged)]Object reference not set to an instance of an object.
at VaultClientOperationsLib.WorkingFolder.GetHiddenFolderName(ClientInstance ci, String folderName)
at VaultClientOperationsLib.WorkingFolder.GetHiddenFolderName()
at VaultClientOperationsLib.WorkingFolder.GetHiddenStateFilename()
at VaultClientOperationsLib.WorkingFolder.LoadState()
at VaultClientOperationsLib.WorkingFolder..ctor(ClientInstance ci, String diskFolderPath, Boolean makeBackups)
at VaultClientOperationsLib.ClientInstance.FindOrCreateWorkingFolder(String diskPath, Boolean makeBackups)
at VaultClientOperationsLib.ClientInstance.GetWorkingFolder(String strWorkingFolder, Boolean bMakeBackups)
at VaultClientOperationsLib.ClientInstance.UpdateKnownChanges_Folder(VaultClientFolder folder, Hashtable alreadySearchedFolderPaths, Boolean recursive)
at VaultClientOperationsLib.ClientInstance.UpdateKnownChanges_All(Boolean notifyChangeSetItemsChanged)
Stack Trace:
at VaultClientOperationsLib.ClientInstance.UpdateKnownChanges_All(Boolean notifyChangeSetItemsChanged)
at VaultClientOperationsLib.ClientInstance.UpdateKnownChanges_All(Object notifyChangeSetItemsChanged)
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
I had one instance of VS2005 open, 2 of VS2008 and the GUI client. All crashed.
The following is from VaultVsipClient.txt (let me know if I should upload the whole file)
04-May-2010 16:41:19 <generic>: [<No Name>:5968] [System.NullReferenceException: Object reference not set to an instance of an object.
at VaultClientOperationsLib.WorkingFolder.GetHiddenFolderName(ClientInstance ci, String folderName)
at VaultClientOperationsLib.WorkingFolder.GetHiddenFolderName()
at VaultClientOperationsLib.WorkingFolder.GetHiddenStateFilename()
at VaultClientOperationsLib.WorkingFolder.LoadState()
at VaultClientOperationsLib.WorkingFolder..ctor(ClientInstance ci, String diskFolderPath, Boolean makeBackups)
at VaultClientOperationsLib.ClientInstance.FindOrCreateWorkingFolder(String diskPath, Boolean makeBackups)
at VaultClientOperationsLib.ClientInstance.GetWorkingFolder(String strWorkingFolder, Boolean bMakeBackups)
at VaultClientOperationsLib.ClientInstance.UpdateKnownChanges_Folder(VaultClientFolder folder, Hashtable alreadySearchedFolderPaths, Boolean recursive)
at VaultClientOperationsLib.ClientInstance.UpdateKnownChanges_All(Boolean notifyChangeSetItemsChanged)]Object reference not set to an instance of an object.
at VaultClientOperationsLib.WorkingFolder.GetHiddenFolderName(ClientInstance ci, String folderName)
at VaultClientOperationsLib.WorkingFolder.GetHiddenFolderName()
at VaultClientOperationsLib.WorkingFolder.GetHiddenStateFilename()
at VaultClientOperationsLib.WorkingFolder.LoadState()
at VaultClientOperationsLib.WorkingFolder..ctor(ClientInstance ci, String diskFolderPath, Boolean makeBackups)
at VaultClientOperationsLib.ClientInstance.FindOrCreateWorkingFolder(String diskPath, Boolean makeBackups)
at VaultClientOperationsLib.ClientInstance.GetWorkingFolder(String strWorkingFolder, Boolean bMakeBackups)
at VaultClientOperationsLib.ClientInstance.UpdateKnownChanges_Folder(VaultClientFolder folder, Hashtable alreadySearchedFolderPaths, Boolean recursive)
at VaultClientOperationsLib.ClientInstance.UpdateKnownChanges_All(Boolean notifyChangeSetItemsChanged)
Stack Trace:
at VaultClientOperationsLib.ClientInstance.UpdateKnownChanges_All(Boolean notifyChangeSetItemsChanged)
at VaultClientOperationsLib.ClientInstance.UpdateKnownChanges_All(Object notifyChangeSetItemsChanged)
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
Re: NullReference exception in VS2003 and VS2005 using Vault
If you access any files with your Vault GUI client, do you get an error, or does this only happen when you are using VS?
Are VS 2005 and VS 2008 all accessing the same program?
We should go through the troubleshoot with just one program open to narrow the issue down. If this happens with the GUI client, then I'd like you to close VS and focus on the GUI client.
Are VS 2005 and VS 2008 all accessing the same program?
We should go through the troubleshoot with just one program open to narrow the issue down. If this happens with the GUI client, then I'd like you to close VS and focus on the GUI client.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: NullReference exception in VS2003 and VS2005 using Vault
That last error occurred as I was starting a debug session in one of the VS2008 instances, however it usually happens independently of any user action. E.g. I'll come back to my desk after a break and VS/VaultGUI will have crashed.
I guess that indicates a problem or conflict with a service... perhaps, as Mike Dimmick suggested, it's something to do with the search indexing...
Unfortunately I don't have enough time to spend on trying to replicate this. when I have the time, I'll try disabling the search service and/or moving my root working directory to see if that stops it happening.
Cheers
A
I guess that indicates a problem or conflict with a service... perhaps, as Mike Dimmick suggested, it's something to do with the search indexing...
Unfortunately I don't have enough time to spend on trying to replicate this. when I have the time, I'll try disabling the search service and/or moving my root working directory to see if that stops it happening.
Cheers
A
Re: NullReference exception in VS2003 and VS2005 using Vault
The particular error you posted appears to point to a renaming action. Do you have any renames pending?
Some fixes were put into Vault 5.0.3 that should take care of these types of errors. Upgrading is likely to be your best course of action.
Some fixes were put into Vault 5.0.3 that should take care of these types of errors. Upgrading is likely to be your best course of action.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: NullReference exception in VS2003 and VS2005 using Vault
I don't recall having any renames pending at that time, but it's quite possible.
We are intending to upgrade but, as with everything, it's a question of time...
Thanks for your time.
A
We are intending to upgrade but, as with everything, it's a question of time...
Thanks for your time.
A
Re: NullReference exception in VS2003 and VS2005 using Vault
Thank you for the update. If you can, let me know your results after upgrading.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support