The source code line specified by the PDB file appears to be

MikeYeagerMikeYeager Posts: 5 Bronze 1
The source code line specified by the PDB file appears to be invalid.

I have a WPF app that's using 50% CPU just sitting there, so I downloaded the trial version of ANTS 4.1 and profiled it. I pointed it to the executable in the \bin\debug folder and accepted all of the defaults. All of the PDB files for every EXE and DLL are in that folder, even for DLLs that I'm referencing in the app (except System.XXX). The profiler looks correct when it first comes up. When I select an area on the graph where it just sits there eating 50% CPU, it shows only the Main() method and appears to show the source code for the main app correctly.

Any idea how I can track down this error message and determine which PDB file it thinks is invalid?

It is possible that WPF is causing the high CPU use and the profiler isn't showing the issue because it's not in my code, but I want to be sure. If I do a trace, none of my code is running.

Thanks
Mike :P

Comments

  • What method do you click on when you get this message? Is it Main()?

    In this circumstance, this message is usually caused by PDBs that point to non-existant lines, much like using the #line directive in C#. In the case of a WPF app, this is usually the PDB referencing lines in the .xaml file which don't exist (eg #line FEEFEE is often used by Microsoft as a 'magic number' for debuggers).

    So, I wouldn't really worry about this error message in this circumstance. It's just ANTS Profiler saying that the PDB refers to lines which don't exist.

    Your 50% CPU issue is probably caused by something in the XAML, and not your code. Unfortunately, the debug data produced by XAML files is so poor that line-level profiling isn't usually effective, since we cannot find out which line corresponds to which IL instruction. Your best bet is probably to examine the stack traces and call graphs provided by the profiler.

    I hope this helps!
    Jason Crease
    Red Gate Software
  • The message appears between the upper graph and the lower code pane and it's there all the time, no matter which time zone I choose. I think you're right about the XAML, so we're going to simplify it more and more until we find the issue.

    Thanks
Sign In or Register to comment.