.NET Framework - The symbol myModule.pdb does not match the module even known chkmatch says it does!

Asked By Vinz
08-Aug-07 02:42 PM
Hi,

I'm using Vista 64 bit with visual studio 2005 on a 32 bit debug program
with native C++ dlls and .NET executables dlls using DllImports.

I'm trying to use a minidump of that program. I would like see the call
stack. But I fail to load the symbols files of my .NET dlls. The native dlls
symbols are loaded correctly.

I guess that's why the call stack seems to be correctly displayed in the
native code and not in the managed code.

I already rebuild the project and checked the pdb files are the good ones. I
checked the pdb with chkmatch tool from www.debuginfo.com which says the
exe/dlls and pdbs are matching.

I tried many ways of generating the minidump files :
- visual studio
- clrdump from www.debuginfo.com,
- direct call to 'MiniDumpWriteDump' in dbghelp.dll
- task manager


I tried to call the code to generate a minidump instead of doing that in a
filter of unhandled exceptions.

None of those attempts  allowed to me to get a correct call stack in visual
studio.

By the way I noticed I can't load the symbols either when direclty debugging
the software. But then the call stack is displayed anyway.

Anyone has a idea ?
Vista
(1)
JeffreyThe
(1)
StackTrace
(1)
JeffreyI
(1)
Debuggers
(1)
Varieties
(1)
Windows
(1)
Stacks
(1)
  jeta replied...
09-Aug-07 02:12 AM
Hi Vinz,

Based on my experience, Stack walking in .Net does not need the symbol
files; it will retrieve the managed object types from the metadata for the
walking. As a proof, .Net provided StackTrace class which allows us to walk
the stack at runtime. Sure, we do not have any symbol files at runtime.

Regarding the symbol loading, are you debugging the dump files from VS2005
or windbg? Do you experience the symbol loading problem for all the managed
modules or only one specific managed module? If you are using VS2005, you
have to turn off the "Just My Code" option in Tools -> Options ->Debugging
-> "Enable Just My Code". If you still can not resolve it, you may first
open Debug->Windows->Modules to open the modules window. Then, you may find
your module entry, right click it and select "Symbol Load Information" to
examine the details of the symbol probing paths. Another way is using
windbg to debug your application and use "!sym noisy" command to examine
the symbol loading details.

I suspect the stack walking failure is caused by the lack of memory data in
your minidump. Have you tried to take a full dump and have a test, does
this problem still exist?

I will wait for your further test information, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
  Vinz replied...
09-Aug-07 10:27 AM
Thanks for your reply Jeffrey

The Stack Trace string shows only managed code. So I would miss native-code
crashs. Using a complete dump would mean customers sending gigabytes of
data. So that would be almost unusable.

Thanks to your tips I found what was wrong.


1) small minidumps

I found out that VS2005 (and previous version) can't show the managed code
stack from a minidump (at least not with a small one).

It's still possible using SOS commands. I'm the following in Immediate
Window of VS2005 or in Windbg
and it outputs the complete stack for both managed and native code with
matching source code.

2) full dumps

Anyway, full dumps could be usefull in some cases.

I tried the full dump debugging you talked about using VS2005 and disabling
'Just My Code' options . I still can't see the managed code stack using the
Call Stack window. it's is replaced by some '001ba8b()'-like lines.

It looks like the symbols loading error is not the problem as 'Symbol Load
Information ...' reports:
So it justs means there is no native code in my .NET dll. That is to be
expected from a c# project!

Maybe there is a specific way to generate full dumps when using managed code
?

best regards,
Vinz

P.S: Sorry, I wrongly replied to your mail address instead of replying on
the newsgroup
  jeta replied...
09-Aug-07 10:18 PM
Hi Vinz,

Thank you for the feedback.

I have further discussed this issue with the CLR team internally. As they
confirmed, VS doesn't support managed dump debugging. This is due to
architectural limitations within the CLR. We have to use WinDbg + sos.dll.

Assembly metadata contains function names and param types, but symbol files
provide source file names, line numbers, and local variable names. So
symbols are not as necessary when debugging .NET code, but they are still
beneficial. We do not have official document for this yet, but it's
mentioned in multiple places like the one below:
http://msdn2.microsoft.com/en-us/library/ms954590.aspx

It seems that minidump is not the root cause of this problem. Stacks are
contained in minidumps without heap information and you can view them in
WinDbg using sos (!clrstack). As mentioned above, your problem is caused by
that there is no integrated support (technically, you can use sos in VS as
well, but it's all via text commands and output in the immediate window)
for managed dump debugging in VS due to an architectural limitation of the
CLR. I hope this clears your confusion.

Finally, the best resource regarding minidump vs fulldump is the windbg
help document. After you installed windbg and opened the help chm, you may
open Debuggers->Crash Dump Files ->User-Mode Dump Files->Varieties of
User-Mode Dump Files ->Full User-Mode Dumps/Minidumps. By default, "/m" is
the default option, in which the dump will include module, thread, and
stack information, but no additional data.

If you still have anything unclear, please feel free to tell me, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
  jeta replied...
13-Aug-07 11:13 PM
Hi Vinz,

Have you reviewed my last reply to you? Does it make sense to you? If you
still need any help or have any concern, please feel free to tell me,
thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
  Vinz replied...
14-Aug-07 05:14 AM
Hi Jeffrey

I got trouble using this newsgroup against winmail. It's nice to have
assumptions being asserted by the CLR team.
It all makes sense now and I can work with that.

Thank you for your support.

Best regards,
Vinz
  jeta replied...
14-Aug-07 06:08 AM
Hi Vinz,

Thank you for confirming the status.

Ok, if you need further help, please feel free to post, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
  Vinz replied...
14-Aug-07 03:26 AM
Hi Jeffrey

I read your last reply. You turned my assumptions about minidump and CLR
into something clear (and asserted by the CLR team, nice).
I don't have any concern about minidumps anymore.

Thank you for your support.

Best regards,
Vinz
help
Getting a Thumbnail In Vista .NET Framework Hi, I'm hoping someone can help me get a scalable thumbnail from Vista. Vista has a new COM API, IThumbnailCache which backs on to Vista's global thumbnail store. Unfortunately, I can't find it I know it's there coclasses, but it's not there. I've downloaded a spreadsheet detailing all the new Vista APIs and where they can be found, but this says IThumbnailCache is in uuid.dll any example code? Cheers, Tim http: / / www.dotnoodle.com - The DotNet Search. .NET Framework Discussions Vista (1) IThumbnailCache (1) APIs (1) Thumbnail (1) Windows (1) Coclasses (1) COM (1) IDL (1 from the IDL file. - - = 20 Jim Barry, MVP (Windows SDK) keywords: Getting, a, Thumbnail, In, Vista description: Hi, I'm hoping someone can help me get a scalable thumbnail from Vista. Vista has a new COM API, IThumbnailCache which backs on to Vista's global thumbn
Can the .NET2.0 application apply Vista theme in Windows Vista? .NET Framework I want to know if my .net2.0 application can apply Vista theme when run in Windows Vista. How to do if it is possible. Thank you. VB.NET Discussions Windows Vista (1 Vista (1) WPF (1) XP (1) Wagner (1) Seth (1) Rowe (1) NET2.0 (1) I XP. Thanks, Seth Rowe No, the controls have no any changes when you change Windows Vista theme. ??????:1192624763.712163.125080@z24g2000prh.googlegroups.com. . . Does your application have visual styles enabled? - - M I know is to use WPF. - - Tom Shelton keywords: Can, the, .NET2.0, application, apply, Vista, theme, in, Windows, Vista? description: I want to know if my .net2.0 application can
Vista or Asta la Vista ? .NET Framework I ask this question to all web designers and coders alike out there MS XP Media Centre 2005 Edition, but have just received my new free upgrade to Vista Home premium. Now I am a little concerned it may effect some of the programmes my web design. I have heard lots of issues with programmes no longer working with vista. I need some advice either to sit tight with XP MC2005 or go with vista beacause there aint no problems ? Thanks Phil - - http: / / www.philbrighton.co.uk Web Designer Magazine Forum Moderator http: / / webdesignermag.co.uk / forum / index.php?sid = 30f008e710b30fc98e6af916c8b41571 Expression Web Designer Discussions Vista (1) XP (1) Expression Web (1) IIS (1) ASP.NET (1) MS (1) Windows Update (1) FrontPage (1) Hi Phil, I went down the Vista route a few weeks ago. Im now back to XP Pro again. Personally, it was the aero interface looks quite smart, but for me it is simply not it. John Vista is HOT! And, with the exception of Adobe and Apple, software is not a problem
VS 2005 SP1 for Vista Problems (in XP) .NET Framework Recently installed VS 2005 on Vista with the SP 1 for Vista. Took existing product and built in Vista. Runs in Vista, but no longer runs in XP (some error message about not being configured properly). The development machines. The program consists of one EXE and several COM DLLs. Also, since the Vista and XP OS's are installed on the same machine (dual boot), the VS 2005 build (XP build) yielded UAC messages when running the software. However, when built with new Vista version, these message no longer are present (yes, I am an administrator and UAC is side-by-side and manifests, but these are new to me. Visual Studio .NET Discussions Vista (1) XP (1) MFC (1) VS (1) MSVCR (1) InstallShield (1) EXE (1) NeuroScript (1