Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

IVsFileChangeEvents.FilesChanged crashes with System.IO.PathTooLongException

$
0
0

Hi there,

I am building an extension for Git, called Git Tools https://github.com/yysun/git-tools, where I used IVsFileChangeEvents.FilesChanged to monitor the file changes.

When the solution folder structure is long, e.g. in case of using node/npm that could have nested node_modules sub-folders, the extension crashed with the call stack listed below.

I wonder if you can confirm this is a bug in IVsFileChangeEvents.FilesChanged. And is there a workaround?

Thank you,

yysun

Exception Call Stack:

 mscorlib.dll!System.IO.Path.NormalizePath(string path, bool fullCheck, int maxPathLength, bool expandShortPaths)Unknown
 mscorlib.dll!System.IO.Path.GetDirectoryName(string path)Unknown
>Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.DirectoryWatcher.SelectUniqueDirectories.AnonymousMethod__20(System.Collections.Generic.KeyValuePair<string,Microsoft.VisualStudio.Services.ChangeStreamDigest> kvpair)Unknown
 System.Core.dll!System.Linq.Enumerable.WhereSelectListIterator<System.Collections.Generic.KeyValuePair<string,Microsoft.VisualStudio.Services.ChangeStreamDigest>,string>.MoveNext()Unknown
 System.Core.dll!System.Linq.Enumerable.WhereEnumerableIterator<string>.MoveNext()Unknown
 System.Core.dll!System.Linq.Enumerable.DistinctIterator<string>()Unknown
 System.Core.dll!System.Linq.Enumerable.Contains<string>(System.Collections.Generic.IEnumerable<string> source, string value, System.Collections.Generic.IEqualityComparer<string> comparer)Unknown
 System.Core.dll!System.Linq.Enumerable.Contains<string>(System.Collections.Generic.IEnumerable<string> source, string value)Unknown
 Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.DirectoryWatcher.ProcessDirectoryChanges(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Microsoft.VisualStudio.Services.ChangeStreamDigest>> digests, int depth)Unknown
 Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.DirectoryWatcher.ProcessChanges(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Microsoft.VisualStudio.Services.ChangeStreamDigest>> digests, int depth)Unknown
 Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.DirectoryWatcher.ProcessChanges(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Microsoft.VisualStudio.Services.ChangeStreamDigest>> digests, int depth)Unknown
 Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.Services.DirectoryWatcher.OnChangedAsync()Unknown
 WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)Unknown
 WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler)Unknown
 WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl()Unknown
 WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state)Unknown
 mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)Unknown
 mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)Unknown
 mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)Unknown
 WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke()Unknown
 WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue()Unknown
 WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)Unknown
 WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)Unknown
 WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)Unknown
 WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)Unknown
 WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler)Unknown
 WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)Unknown
 WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)Unknown



Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>