WinDbg can't open dumps "Dbghelp version mismatch" - windbg

This is something like the question WinDbg: Version mismatch of dbghelp.dll when trying to attach to a process
However, I can't post to that question and the marked answer isn't really an answer and doesn't work for me.
I have a machine which I used to use for debugging crash dumps, but suddenly it fails to open any dumps, always reporting
dbghelp.dll has a version mismatch with the debugger
Microsoft (R) Windows Debugger Version 10.0.14321.1024 X86
Copyright (c) Microsoft Corporation. All rights reserved.
command line: '"C:\Program Files (x86)\Windows Kits\Debuggers\x86\windbg.exe" -c ".cmdtree c:\cmdtree.txt"
dbgeng: image 10.0.14321.1024, built Sat Jul 16 09:31:09 2016
[path: C:\Program Files (x86)\Windows Kits\Debuggers\x86\dbgeng.dll]
dbghelp: image 10.0.14321.1024, built Sat Jul 16 09:29:50 2016
[path: C:\Program Files (x86)\Windows Kits\Debuggers\x86\dbghelp.dll]
DIA version: 40116
So it's complaining of a mismatch, but there is no apparent mismatch.
The version of dbghelp and dbgeng in System32 and SysWOW64 is 6.1.7601.17514. But note that:
a) According to Microsoft page on DbgHelp, the version in Windows and WinDbg does not need to be (and probably shouldn't be) synced
b) I have another machine where I have installed 10.0.14321.1024 version of WinDbg, and it also has version 6.1.7601.17514 of dbghelp and dbgeng in Windows folders, and everything's working fine on that machine.
Any assistance appreciated.
This machine is basically bricked as far as analyzing crash dumps is concerned. I've tried reinstalling windbg, and installing different versions, still the same error occurs.

Related

EasyPHP won't start - error 0xc000007b even though C++ redistributables are there

EasyPHP-devserver-17.0 throws this error when starting the dashboard (win 7 x64):
Problem is I installed the 3 C++ redistributables they list: http://www.easyphp.org/faq_devserver.php#collapse001
first x64
then x64 + x86
then removed everything, installed only x86
then added x64 back
Still get the same error.
How can I fix it or get more info about what exactly is failing?

Downloaded symbol files for WinDbg.exe do not load

I installed retail symbols in D:\Symbols and given the path to my windbg.exe but it can't be loaded why?
Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
Connected to Windows 7 7601 x64 target at (Sat Jan 31 14:38:56.920 2015 (UTC + 3:30)), ptr64 TRUE
Symbol search path is: D:\Symbols
Executable search path is:
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntkrnlmp.exe -
Windows 7 Kernel Version 7601 (Service Pack 1) MP (2 procs) Free x64
Product: WinNt, suite: TerminalServer SingleUserTS
Built by: 7601.18247.amd64fre.win7sp1_gdr.130828-1532
Machine Name:
Kernel base = 0xfffff800`02c4b000 PsLoadedModuleList = 0xfffff800`02e8e6d0
Debug session time: Sat Jan 31 14:38:56.968 2015 (UTC + 3:30)
System Uptime: 0 days 0:43:25.215
The Debug Symbols that Microsoft provides are only usable for the RTM or Sp1 Version of Windows 7. When you install an Update, the PDBs no longer match.
Here you must point to the Symbol Server to download the new PDBs:
SRV*D:\Symbols*http://msdl.microsoft.com/download/symbols
It's easier if you have an internet connection to let windbg find and download the correct ones for you, whereby it will be cached locally:
.symfix;.reload
Will go and fetch the correct symbols from the MS symbol server at http://msdl.microsoft.com/download/symbols
if you download them yourself then you have to download the correct version matching your specific build and this is just too much of a headache to maintain so IMO it's just simpler to just let windbg handle this for you.

WinDbg: Dump indicates CLR version that is used nowhere

I am analyzing a memory dump of an IIS worker process running on a Windows Server 2008 on my Windows 8 workstation. The dump is a mini dump taken using task manager.
The .Net Framework versions on server and workstation differ:
Workstation: 4.0.30319.18046
Server where the dump was taken: 4.0.30319.296
I copied sos.dll and mscordacwks.dll from the server to my workstation in a dedicated directory, then opened the dump in WinDbg.
Symbol File Path: SRV*c:\dev\symbols*http://msdl.microsoft.com/download/symbols
Then I load the sos.dll copied from the server:
0:000> .load D:\temp\dumps\sos.dll
This allows me to list the threads using !threads or watch stacks using !clrstack.
But when using !pe or !clrstack, I get a version mismatch warning:
0:000> !pe
The version of SOS does not match the version of CLR you are debugging. Please
load the matching version of SOS for the version of CLR you are debugging.
CLR Version: 4.0.30319.1
SOS Version: 4.0.30319.296
The current thread is unmanaged
While I could see the stacks that interested me, I'm confused about the CLR Version in the warning: Where does this version come from?
The dump indicates version 4.0.30319.1 when I execute
lmv m clr
But 4.0.30319.1 is used nowhere in this case, neither on server nor workstation.
Or am I missing something?
Additionally, WinDbg loads the symbol files for mscordacwks_AMD64_AMD64_4.0.30319.01.dll to my symbols directory.
Output of .cordll:
0:000> .cordll -ve -u -l
CLRDLL: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscordacwks.dll:4.0.30319.18046 f:8
doesn't match desired version 4.0.30319.01 f:8
CLRDLL: Loaded DLL c:\dev\symbols\mscordacwks_AMD64_AMD64_4.0.30319.01.dll\4BA21EEB965000\mscordacwks_AMD64_AMD64_4.0.30319.01.dll
CLR DLL status: Loaded DLL c:\dev\symbols\mscordacwks_AMD64_AMD64_4.0.30319.01.dll\4BA21EEB965000\mscordacwks_AMD64_AM D64_4.0.30319.01.dll
I also tried to copy clr.dll from the server to my workstation and load the runtime using .cordll, but without success:
0:000> .cordll -u -lp D:\temp\dumps
CLRDLL: D:\temp\dumps\mscordacwks.dll:4.0.30319.296 f:8
doesn't match desired version 4.0.30319.01 f:8
CLRDLL: Unable to get version info for 'D:\temp\dumps\mscordacwks_AMD64_AMD64_4.0.30319.01.dll', Win32 error 0n87
CLRDLL: ERROR: Unable to load DLL D:\temp\dumps\mscordacwks_AMD64_AMD64_4.0.30319.01.dll, Win32 error 0n87
CLR DLL status: ERROR: Unable to load DLL D:\temp\dumps\mscordacwks_AMD64_AMD64_4.0.30319.01.dll, Win32 error 0n87
Can anyone shed some light on this versioning issue? Is it somehow related to the type of dump used?
Steps that worked for me (assuming process was 64 bit):
Copy C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SOS.dll from server machine to local directory on your dev machine.
Copy C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscordacwks.dll to the same directory where you copied sos.dll into. Then rename it to mscordacwks_AMD64_AMD64_4.0.30319.01.dll.
Load the copied version of sos.dll -- mscordacrwks will be loaded automatically.
In more details, the procedure is described here: http://blogs.msdn.com/b/salvapatuel/archive/2010/03/09/how-to-configure-windbg-to-run-other-versions-of-the-net.aspx?Redirected=true.

problems with creating an exe file in matlab

this is the session of building exe file in matlab 7.1.
I think I have a problem with the compiler.
mbuild -setup
Please choose your compiler for building standalone MATLAB
applications: Would you like mbuild to locate installed compilers
[y]/n? y
Select a compiler:
[1] Microsoft Visual C++ 2008 Express in C:\Program Files (x86)\Microsoft Visual Studio 9.0
[0] None
Compiler: 1
Please verify your choices:
Compiler: Microsoft Visual C++ 2008 Express
Location: C:\Program Files (x86)\Microsoft Visual Studio 9.0
Are these correct [y]/n? y
*****************************************************************************
Error: Could not find the 64-bit compiler. This may indicate that the
"X64 Compilers and Tools" or the Microsoft Windows Software
Development Kit (SDK) is not installed. To build 64-bit binaries,
Microsoft Visual C++ 2008 Express Edition requires that these two
packages be properly installed.
*****************************************************************************
Trying to update options file: C:\Users\****\AppData\Roaming\MathWorks\MATLAB\R2010a\compopts.bat
From template: C:\PROGRA~1\MATLAB\R2010a\bin\win64\mbuildopts\msvc90freecompp.bat
Done . . .
>> mcc -m mainmain.m -o mainmain
Could not find the compiler "cl" on the DOS path.
Use mbuild -setup to configure your environment properly.
C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Unable to locate compiler.
Error: An error occurred while shelling out to mbuild (error code = 2).
Unable to build executable (specify the -v option for more information).
??? Error using ==> mcc
Error executing mcc, return status = 1 (0x1).
if the problem is with the compiler, how can I install another compiler?
I have windows 7 (64 bits) and I want that the exe file will work on windows operating system.
This is probably the result of one of two issues.
1) You don't have the Windows SDK installed (as indicated in the error message). According to this MathWorks page regarding supported compilers
Both Microsoft Visual Studio 2008 and Windows Software Development Kit (SDK) 6.1 must be installed. When installing Microsoft Visual Studio, you must choose "X64 Compilers and Tools" when installing Microsoft Visual Studio; this is not selected by default.
Now, keep in mind, this reference is for the most recent release of MATLAB, but I'm betting that this information is still relevant to your issue.
You can download the SDK here.
2) It's also possible that the compiler that you're using simply isn't supported for your release of MATLAB. See here for info on supported compilers for MATLAB 7.1.

Load Library error Matlab

I intend to work with OpenCV 1.1 version and Matlab2011 together. The program uses call to load library. However, it returns an error
> In loadlibrary at 347
In Untitled at 4
Error using loadlibrary (line 421)
There was an error loading the library "C:\Program Files
(x86)\OpenCV1.1\bin\cxcore110.dll"
C:\Program Files (x86)\OpenCV1.1\bin\cxcore110.dll is not a valid
Win32 application.
I have tested the program in Matlab 2008 and 2010 where it gives error of a different kind I have installed x64 Compilers and Tools and my system has Visual Studio2008 and 2010 with SDK7 and 6.1. Also, on doing MEX setup I get the following options
Select a compiler:
[1] Microsoft Software Development Kit (SDK) 7.1 in c:\Program Files (x86)\Microsoft Visual Studio 10.0
[2] Microsoft Visual C++ 2010 Express in c:\Program Files (x86)\Microsoft Visual Studio 10.0
[0] None
Compiler: 2
This also returns the error
Error in ==> untitled at 5
loadlibrary(...
I am perplexed at what to do as this problem is persistently appearing. I even followed the thread in link where tit mentions that 2011 supports load library. So,why does it not work?Please help.
Applications compiled for 32bits don't mix with applications compiled for 64bits. If your OpenCV was compiled for 32bits, make sure Matlab is 32bits as well as your compilers.
BTW, seriously consider moving to a more recent version. OpenCV 1.1 is jurassic!