【发布时间】:2013-02-12 02:29:46
【问题描述】:
我在 Windows Server 2012 上安装了 Visual Studio 2012 RTM Plus 更新和 Web Essentials 2012 V1.7,当我打开 CSS 文件时出现以下崩溃。
System.NullReferenceException:对象引用未设置为实例 的一个对象。在 Microsoft.Web.Editor.ComponentLocatorWithOrdering
2.ImportMany() at Microsoft.Web.Editor.ComponentLocatorForContentType1.FindFirstOrderedComponent(String contentTypeName) 在 Microsoft.CSS.Editor.CssEditorDocument.InitializeTextBuffer(ITextBuffer 文本缓冲区)在 Microsoft.CSS.Editor.CssEditorDocument.FromTextBuffer(ITextBuffer 文本缓冲区)在 MadsKristensen.EditorExtensions.DisplayInlineTextViewCreationListener.SubjectBuffersConnected(IWpfTextView textView,ConnectionReason 原因,Collection`1 subjectBuffers)在 Microsoft.VisualStudio.Text.Editor.Implementation.ConnectionManager.c_DisplayClass8.<.ctor>b_1() 在 Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(对象 errorSource,Action 调用)
我以其他用户而不是本地管理员身份登录,但我仍然遇到崩溃。 (我必须以具有管理员权限的普通用户身份登录,因为我猜出于安全原因,某些 ide 不会在本地管理员的上下文中运行)。
我已经卸载、重新安装、执行 devenv / resetuser 数据,但它仍然崩溃。
如果我卸载 Web Essentials 2012 v1.7(和 1.4、1.5 等),它将停止崩溃。在 V1.4 之前,我相信它工作正常。可能是环境中的其他扩展发生冲突,例如工作台工具,但我看不到任何添加内容,并且我已经卸载了我能想到的所有内容。
我想追踪这个错误并了解扩展安装顺序,并尝试了解它将要做什么,以便我对可能影响它的任何事情有一些线索。
上一个条目
"开始包加载【Visual Studio CSS 编辑包】 {A764E895-518D-11D2-9A89-00C04F79EFC3} VisualStudio 2012/11/12 12:10:02.504 484 加载 UI 库 C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages*\CSSPkgUI.dll {A764E895-518D-11D2-9A89-00C04F79EFC3} VisualStudio 2012/11/12 12:10:02.504 485 结束包加载 [Visual Studio CSS 编辑 包] {A764E895-518D-11D2-9A89-00C04F79EFC3} VisualStudio 2012/11/12 12:10:02.505"
据我所知,Microsoft Web 编辑器正试图将编辑缓冲区的内容移交给 Web Essentials Editor 扩展并崩溃。
事件日志
应用程序:devenv.exe 框架版本:v4.0.30319 描述: 由于未处理的异常,进程被终止。异常信息: System.NullReferenceException 堆栈:在 Microsoft.Web.Editor.ComponentLocatorWithOrdering
2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ImportMany() at Microsoft.Web.Editor.ComponentLocatorForContentType1[[System._Canon, mscorlib,版本=4.0.0.0,文化=中性, PublicKeyToken=b77a5c561934e089]].FindFirstOrderedComponent(System.String) 在 Microsoft.CSS.Editor.CssEditorDocument.InitializeTextBuffer(Microsoft.VisualStudio.Text.ITextBuffer) 在 Microsoft.CSS.Editor.CssEditorDocument.FromTextBuffer(Microsoft.VisualStudio.Text.ITextBuffer) 在 MadsKristensen.EditorExtensions.HighlightWordTagger.EnsureInitialized() 在 MadsKristensen.EditorExtensions.HighlightWordTagger.UpdateAtCaretPosition(Microsoft.VisualStudio.Text.Editor.CaretPosition) 在 MadsKristensen.EditorExtensions.HighlightWordTagger+c_DisplayClass3.b__2() 在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) 在 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate、System.Object、Int32、System.Delegate)在 System.Windows.Threading.DispatcherOperation.InvokeImpl() 在 System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object) 在 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback,System.Object,布尔值)在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback,System.Object,布尔值)在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback,System.Object)在 System.Windows.Threading.DispatcherOperation.Invoke() 在 System.Windows.Threading.Dispatcher.ProcessQueue() 在 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr,Int32,IntPtr, MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) 在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) 在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) 在 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate、System.Object、Int32、System.Delegate)在 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) 在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
我注意到它提到了highlightword 标记器。这是一个线索吗? (或者只是第一个调用点?),我也没有在 html 文件中突出显示颜色语法。
我也在一台单独的 Windows 8 笔记本电脑上多次遇到同样的崩溃,有一天,在我坐下来卸载并将其撞死后,错误就消失了,我尝试了如此多的禁用、启用、往返,很难想象会发生什么已经修好了。
还有其他日志可以用来追踪吗?
【问题讨论】:
-
代码格式和块引用格式对这篇文章有很大帮助。