microsoft / microsoft/perfview

COMException during symbol lookup when using OpenStackViewer and MutableTraceEventStackSource

Open
#2,108 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.7k
Forks
775
Avg merge
5d 11h
Merged PRs (30d)
9

Description

When opening a stack view via OpenStackViewer with MutableTraceEventStackSource from an extension, symbols are loaded and shown as expected.
However, the following exception occurs when trying to open any other view, e.g., built-in "CPU Stacks", and no symbols are shown.

An exception occurred during symbol lookup.  Continuing...
Exception: System.Runtime.InteropServices.COMException (0x80040155): Interface not registered (Exception from HRESULT: 0x80040155)
   at Dia2Lib.DiaLoader.IClassFactory.CreateInstance(Object aggregator, Guid& refiid, Object& createdObject)
   at Dia2Lib.DiaLoader.GetDiaSourceObject()
   at Microsoft.Diagnostics.Symbols.NativeSymbolModule..ctor(SymbolReader reader, String pdbFilePath, Action`1 loadData)
   at Microsoft.Diagnostics.Symbols.SymbolReader.OpenSymbolFile(String pdbFilePath)
   at Microsoft.Diagnostics.Tracing.Etlx.TraceCodeAddresses.OpenPdbForModuleFile(SymbolReader symReader, TraceModuleFile moduleFile)
   at Microsoft.Diagnostics.Tracing.Etlx.TraceCodeAddresses.LookupSymbolsForModule(SymbolReader reader, TraceModuleFile moduleFile, IEnumerator`1 codeAddressIndexCursor, Boolean enumerateAll, Int32& totalAddressCount)
   at Microsoft.Diagnostics.Tracing.Etlx.TraceCodeAddresses.LookupSymbolsForModule(SymbolReader reader, TraceModuleFile file)
Completed: Looking up high importance PDBs that are locally cached   (Elapsed Time: 0.079 sec)

Same happens when opening them in the reverse order. Essentially, the first view has no issues with loading symbols, while the second one fails with the above exception.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by opening a stack view through OpenStackViewer with MutableTraceEventStackSource, then opening a second view such as CPU Stacks in either order. Start with Dia2Lib.DiaLoader.GetDiaSourceObject and SymbolReader.OpenSymbolFile in the reported stack trace; done means both views load symbols without the COMException.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.