在编辑器中打开任何文件时,Visual Studio 2015崩溃



我对VS2015有一些问题:当我打开任何项目并试图打开一个文件进行编辑时,VS2015崩溃。我尝试重新安装,所有/命令等等。

ActivityLog.xml:

  <entry>
    <record>430</record>
    <time>2015/11/03 14:46:35.669</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.IO.FileFormatException: Input file or data stream does not conform to the expected file format specification. ---&gt; System.IO.FileFormatException: Input file or data stream does not conform to the expected file format specification.&#x000D;&#x000A;   at MS.Internal.Text.TextInterface.Native.Util.ConvertHresultToException(Int32 hr)&#x000D;&#x000A;   at MS.Internal.Text.TextInterface.Font.CreateFontFace()&#x000D;&#x000A;   at MS.Internal.Text.TextInterface.Font.AddFontFaceToCache()&#x000D;&#x000A;   at MS.Internal.Text.TextInterface.Font.GetFontFace()&#x000D;&#x000A;   at System.Windows.Media.GlyphTypeface..ctor(Font font)&#x000D;&#x000A;   at MS.Internal.FontFace.PhysicalFontFamily.GetGlyphTypeface(FontStyle style, FontWeight weight, FontStretch stretch)&#x000D;&#x000A;   at MS.Internal.FontFace.PhysicalFontFamily.MS.Internal.FontFace.IFontFamily.GetTypefaceMetrics(FontStyle style, FontWeight weight, FontStretch stretch)&#x000D;&#x000A;   at System.Windows.Media.Typeface.ConstructCachedTypeface()&#x000D;&#x000A;   at System.Windows.Media.Typeface.get_CachedTypeface()&#x000D;&#x000A;   at System.Windows.Media.Typeface.get_Symbol()&#x000D;&#x000A;   at MS.Internal.TextFormatting.TextStore.FetchTextRun(Int32 cpFetch)&#x000D;&#x000A;   at MS.Internal.TextFormatting.TextStore.FetchLSRun(Int32 lscpFetch, TextFormattingMode textFormattingMode, Boolean isSideways, Plsrun&amp; plsrun, Int32&amp; lsrunOffset, Int32&amp; lsrunLength)&#x000D;&#x000A;   at MS.Internal.TextFormatting.LineServicesCallbacks.FetchRunRedefined(IntPtr pols, Int32 lscpFetch, Int32 fIsStyle, IntPtr pstyle, Char* pwchTextBuffer, Int32 cchTextBuffer, Int32&amp; fIsBufferUsed, Char*&amp; pwchText, Int32&amp; cchText, Int32&amp; fIsHidden, LsChp&amp; lschp, IntPtr&amp; lsplsrun)&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at MS.Internal.TextFormatting.TextMetrics.FullTextLine.FormatLine(FullTextState fullText, Int32 cpFirst, Int32 lineLength, Int32 formatWidth, Int32 finiteFormatWidth, Int32 paragraphWidth, LineFlags lineFlags, FormattedTextSymbols collapsingSymbol)&#x000D;&#x000A;   at MS.Internal.TextFormatting.TextFormatterImp.FormatLineInternal(TextSource textSource, Int32 firstCharIndex, Int32 lineLength, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache)&#x000D;&#x000A;   at MS.Internal.TextFormatting.TextFormatterImp.FormatLine(TextSource textSource, Int32 firstCharIndex, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak)&#x000D;&#x000A;   at System.Windows.Media.FormattedText.LineEnumerator.FormatLine(TextSource textSource, Int32 textSourcePosition, Double maxLineLength, TextParagraphProperties paraProps, TextLineBreak lineBreak)&#x000D;&#x000A;   at System.Windows.Media.FormattedText.LineEnumerator.MoveNext()&#x000D;&#x000A;   at System.Windows.Media.FormattedText.DrawAndCalculateMetrics(DrawingContext dc, Point drawingOffset, Boolean getBlackBoxMetrics)&#x000D;&#x000A;   at System.Windows.Media.FormattedText.get_Metrics()&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.CodeLensInterLineAdornmentTaggerProvider.TextFormatCache.UpdateTextHeight()&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.CodeLensInterLineAdornmentTaggerProvider.TextFormatCache.EnsureInitialized()&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.CodeLensInterLineAdornmentTaggerProvider.CodeLensInterLineAdornmentTagger.GetTags(NormalizedSnapshotSpanCollection spans)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.&lt;GetTagsForBuffer&gt;d__38.MoveNext()</description>
  </entry>

我发现了一个问题。CodeLens坏了。如果我把它关掉,它就会工作。如何修复CodeLens?字体有问题(ActivityLog.txt显示了一些使用字体的方法)?

我修复了一个CodeLens。我开始通过CCleaner检查注册表错误并修复所有错误。

我遇到了类似的问题。使用wpf程序,如果你安装了一个非法的字体,使用字体错误,当我们使用属性框选择字体时,每个字体都会被使用,所以出现错误。

我发现了环境中的问题:

  • win7 32(x86)
  • .net4.5
  • wpf

希望有人能彻底解决。

最新更新