Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demystifier throws TypeLoadException in PortablePdbReader #103

Open
Maaatiii opened this issue Mar 16, 2020 · 0 comments
Open

Demystifier throws TypeLoadException in PortablePdbReader #103

Maaatiii opened this issue Mar 16, 2020 · 0 comments

Comments

@Maaatiii
Copy link

I tried to use Demystifier and it wasn't working correct. I debug source code and it throws exception in PortablePdbReader.

System.TypeLoadException: 
  at w System.Diagnostics.Internal.PortablePdbReader..ctor()
  at w System.Diagnostics.EnhancedStackTrace.GetFrames(StackTrace stackTrace)
  at w System.Diagnostics.EnhancedStackTrace.GetFrames(Exception exception)
  at w System.Diagnostics.EnhancedStackTrace..ctor(Exception e)
  at w System.Diagnostics.ExceptionExtentions.Demystify[T](T exception)

Exception has been thrown n this part of code:

using (PortablePdbReader portablePdbReader = new PortablePdbReader())
      {
        for (int index = 0; index < frames.Length; ++index)
        {
          StackFrame stackFrame = frames[index];
          MethodBase method = stackFrame.GetMethod();
          if (EnhancedStackTrace.ShowInStackTrace(method) || index >= frames.Length - 1)
          {
            string fileName = stackFrame.GetFileName();
            int row = stackFrame.GetFileLineNumber();
            int column = stackFrame.GetFileColumnNumber();
            int ilOffset = stackFrame.GetILOffset();
            if (string.IsNullOrEmpty(fileName) && ilOffset >= 0)
              portablePdbReader.PopulateStackFrame(stackFrame, method, stackFrame.GetILOffset(), out fileName, out row, out column);
            EnhancedStackFrame enhancedStackFrame = new EnhancedStackFrame(stackFrame, EnhancedStackTrace.GetMethodDisplayString(method), fileName, row, column);
            enhancedStackFrameList.Add(enhancedStackFrame);
          }
        }

I tested version 1.4 and 1.6 and the issue was the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant