[221][220] Exception with .txt solution item
I have a .txt file as solution item in my solution.
If I exit from VS with this .txt file opened and relaunch VS, when RS make the parse of the opened file I receive this exception:
System.ArgumentNullException: Key cannot be null. Parameter name: key at System.Collections.Hashtable.ContainsKey(Object key) at JetBrains.ReSharper.Util.WeakToStrongHashtable.ContainsKey(Object key) in c:\TEMP\tmpC621.tmp\src\Util\src\dataStructures\WeakToStrongHashtable.cs:line 112 at JetBrains.ReSharper.Shell.Impl.ChangeManagerImpl.AddDependency(IChangeProvider provider, IChangeProvider dependsUpon) in c:\TEMP\tmpC621.tmp\src\Shell\src\impl\changes\ChangeManagerImpl.cs:line 520 at JetBrains.VSAddin.TextControl.VSTextControl..ctor(ISolution solution, IVsTextView vsTextView) in c:\TEMP\tmpC621.tmp\src\VSAddin\src\TextControl\VSTextControl.cs:line 64 at JetBrains.ReSharper.EditorManager.VSIntegration.VSEditorManager.RegisterView(IVsTextView view) in c:\TEMP\tmpC621.tmp\src\VSAddin\src\EditorManager\VSEditorManager.cs:line 154 at JetBrains.ReSharper.EditorManager.VSIntegration.VSEditorManager.TextViewOpened(IVsTextView textView) in c:\TEMP\tmpC621.tmp\src\VSAddin\src\EditorManager\VSEditorManager.cs:line 134 at JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.RaiseTextViewOpened(IVsTextView textView) in c:\TEMP\tmpC621.tmp\src\VSAddin\src\Editor\VSDocumentManager.cs:line 623 at JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.OnNewTextView(IVsTextView textView) in c:\TEMP\tmpC621.tmp\src\VSAddin\src\Editor\VSDocumentManager.cs:line 617 at JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.AfterSolutionOpened() in c:\TEMP\tmpC621.tmp\src\VSAddin\src\Editor\VSDocumentManager.cs:line 931 at JetBrains.ReSharper.ProjectModel.Impl.SolutionBase.AfterSolutionOpened() in c:\TEMP\tmpC621.tmp\src\ProjectModel\src\impl\SolutionBase.cs:line 189 --- End of inner exception stack trace --- at JetBrains.ReSharper.Util.Logger.LogExceptionEx(Exception, String, Boolean) in c:\TEMP\tmpC621.tmp\src\Util\src\Logger.cs:line 297 column 9 at JetBrains.ReSharper.Util.Logger.LogException(Exception) in c:\TEMP\tmpC621.tmp\src\Util\src\Logger.cs:line 309 column 5 at JetBrains.ReSharper.ProjectModel.Impl.SolutionBase.AfterSolutionOpened() in c:\TEMP\tmpC621.tmp\src\ProjectModel\src\impl\SolutionBase.cs:line 193 column 11 at JetBrains.ReSharper.ProjectModel.Impl.SolutionManagerBase.OpenSolutionInternal(SolutionImpl, ITaskExecutor) in c:\TEMP\tmpC621.tmp\src\ProjectModel\src\impl\SolutionManagerBase.cs:line 80 column 7 at JetBrains.VSAddin.ProjectModel.VSSolutionManager.OpenCurrentSolution() in c:\TEMP\tmpC621.tmp\src\VSAddin\src\ProjectModel\VSSolutionManager.cs:line 867 column 11 at JetBrains.VSAddin.ProjectModel.VSSolutionManager.OpenVSSolution(Boolean) in c:\TEMP\tmpC621.tmp\src\VSAddin\src\ProjectModel\VSSolutionManager.cs:line 366 column 11 at JetBrains.VSAddin.ProjectModel._OnAfterOpenSolutionDelegatesClass._OnAfterOpenSolutionDelegate125() in c:\TEMP\tmpC621.tmp\src\VSAddin\src\ProjectModel\VSSolutionManager.cs:line 349 column 7 at JetBrains.ReSharper.Shell.PendingAction.Execute() in c:\TEMP\tmpC621.tmp\src\Shell\src\Invocator.cs:line 235 column 11 at JetBrains.ReSharper.Shell.Invocator.ProcessQueue() in c:\TEMP\tmpC621.tmp\src\Shell\src\Invocator.cs:line 167 column 11 at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object, BindingFlags, Binder, Object[], CultureInfo, Boolean, Assembly, Boolean) at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object, BindingFlags, Binder, Object[], CultureInfo, Boolean) at System.Delegate.DynamicInvokeImpl(Object[]) at System.MulticastDelegate.DynamicInvokeImpl(Object[]) at System.Windows.Forms.Control.InvokeMarshaledCallbacks() at System.Windows.Forms.Control.WndProc(Message&) at System.Windows.Forms.ScrollableControl.WndProc(Message&) at System.Windows.Forms.ContainerControl.WndProc(Message&) at System.Windows.Forms.ParkingWindow.WndProc(Message&) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message&) at System.Windows.Forms.ControlNativeWindow.WndProc(Message&) at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr) ]]>
Please sign in to leave a comment.
Hello Antonio,
we tried to repeat this issue but without success. Does it reproduce reliably
for you?
Thanks.
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Yes every time that I left open these documents.
I've tried to create a new txt document (no matter the name) with these text inside:
============================
dòlfkajdfòalf
asf
adsfas
fas
fs
va
sd
as
vas
d
#dfalkdfja
@fadfa@
============================
note the '#' and '@' chars that are used in these kind of document as placeholder markers or directive.
Ah, another thing, the problem is not the .txt because of I have tried to use different file extension.
Hello Antonio,
the contents of the document definitely shouldn't matter for the exception
you posted. How many solution
items do you have in your solution? Can you please try to create a simple
solution containing only those items
and check if the problem happens in that solution?
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hi,
I've create a new blank solution
I've added an existing file that was in another directory (../doc/test.txt)
While VS closing I have received this exception:
and then reopening the solution I've received the same error of previous posts.
Antonio.
Hello Antonio,
thanks for reporting, we'll fix that (another) problem. Please try with a
file inside the project directory.
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
same exception while adding existing file that is in the same solution's directory and when reopening the solution:
JetBrains.ReSharper.Util.InternalErrorException: An exception has occurred ---> System.ArgumentNullException: Key cannot be null.
Parameter name: key
at System.Collections.Hashtable.ContainsKey(Object key)
at JetBrains.ReSharper.Util.WeakToStrongHashtable.ContainsKey(Object key)
Hello Antonio,
I've repeated this problem using nested subfolder of the Solution Items folder.
Thank you a lot for your help!
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
in the last build (222) I receive this exception:
JetBrains.ReSharper.Util.InternalErrorException: An exception has occurred ---> JetBrains.ReSharper.Util.InternalErrorException: Failed to invoke COM. HRESULT=-2147024809
file attached is the result of "Show Log" item menu
Attachment(s):
ReSharper.Log
Hello Antonio,
we've fixed this problem in 223, thanks for reporting.
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"