• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Debugging problem(help needed)

  • Thread starter Thread starter Muting
  • Start date Start date
Joined
12/23/06
Messages
187
Points
28
Hi,

I face some debugging problems with my VC++. When I use debugging, it always reminds me the following information:

'Mtx_Vtr.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'Mtx_Vtr.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
The program '[3596] Mtx_Vtr.exe: Native' has exited with code 0 (0x0).

It is very strange that I can debug before my system crashed this afternoon. When I restart after the crash, it cannot debug and output above information.

I have reinstalled my VC++ package but it didn't help. I really appreciate your help.

Muting
 
Write a small program like "Hello World"... include a break point somewhere and let me know what happens.
 
Write a small program like "Hello World"... include a break point somewhere and let me know what happens.

Alain:

This is what I get from the Output window:
'hello_world.exe': Loaded 'C:\Documents and Settings\ASUS\My Documents\Visual Studio 2005\Projects\hello_world\debug\hello_world.exe', Symbols loaded.
'hello_world.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'hello_world.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.

There is nothing in the watch window.

My program:
Code:
#include <iostream>

using namespace std;

int main() {

    double k = 3.5;


    cout<<"hello, world"<<endl;
}

Breakpoint at "double k = 3.5"
 
Are you running the Release or Debug version? Is this Visual C++ Express Edition?

What was the cause of your system crash? It's pretty hard to crash Windows XP these days. Was that a BSOD or something else?
 
You just reinstall VS 2005, right.
Did you experienced the same problem with VS Express Edition before and have now with new version of VS 2005? If it is the case operating system is causing the problem.

-V-
 
A few things that immediately come to mind:
1) If I understand your earlier post, you were able to debug a "hello world" program, correct? It sounds to me like it probably isn't your Visual studio debugger then. More likely it is the program.
2) For the particulars on the program, are you able to even enter the debugger by doing a "step into", or does it exit immediately?

Steve Townsend's point is good - make sure you've built the debug version. Also, in case you don't know about it, always check MSDN for ideas (msdn.microsoft.com)

By the way, these messages are almost certainly a red herring:

'Mtx_Vtr.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'Mtx_Vtr.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.

All that means is you don't have debugging symbols for these libraries. Unless you've gone to the trouble of setting up a symbol library you can ignore this.

Joe
 
Are you running the Release or Debug version? Is this Visual C++ Express Edition?

What was the cause of your system crash? It's pretty hard to crash Windows XP these days. Was that a BSOD or something else?

Steve:

I am running the Debug version and my C++ is professional edition.

I dont know what exactly is the reason for my computer's crash. But I opened many application programs(i.e. MS word, VC++, msn, IE....) when it crashed. Actually, I have seen the BSOD before on my computer but not this time.

Muting
 
You just reinstall VS 2005, right.
Did you experienced the same problem with VS Express Edition before and have now with new version of VS 2005? If it is the case operating system is causing the problem.

-V-

Vadim:

I am not quite sure. I guess my VS Epress can debug. My professional edition also cannnot debug when I just installed it. Then I googled the problem and change some setting like optimization, runtime libraries in configuration properties. And it can debug in my professional editions. But after my computer's crash, I cannot debug even when I still use those settings.

Muting
 
A few things that immediately come to mind:
1) If I understand your earlier post, you were able to debug a "hello world" program, correct? It sounds to me like it probably isn't your Visual studio debugger then. More likely it is the program.
2) For the particulars on the program, are you able to even enter the debugger by doing a "step into", or does it exit immediately?

Steve Townsend's point is good - make sure you've built the debug version. Also, in case you don't know about it, always check MSDN for ideas (msdn.microsoft.com)

By the way, these messages are almost certainly a red herring:

'Mtx_Vtr.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'Mtx_Vtr.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.

All that means is you don't have debugging symbols for these libraries. Unless you've gone to the trouble of setting up a symbol library you can ignore this.

Joe

Hi, Joe:

I cannot debug because when I press F5, it always output those messages. But I can use "ctrl+ f5". I am not sure whether it is a setting problems because I have looked for the msdn forum and change my setting as the same as that in the forum.

Yes, I can step into.

Muting
 
Hi, Joe:

I cannot debug because when I press F5, it always output those messages. But I can use "ctrl+ f5". I am not sure whether it is a setting problems because I have looked for the msdn forum and change my setting as the same as that in the forum.

Yes, I can step into.

Muting

This is a set up issue then. Could you debug going directly to the Menu bar and clicking on Debug -> Start Debugging?
 
Me and Muting are using the same version of VS 2005, I also reinstall VS a week ago. Debugging works fine on my end. I think it is operating system problem or match between operating system and VS 2005.
Muting, are you using XP? What service pack do you have? SP2?

-V-
 
This is a set up issue then. Could you debug going directly to the Menu bar and clicking on Debug -> Start Debugging?

Alain:

I can click on Debug->Start Debugging but it still outputs that information.

Vadim:

I am using the SP2.
 
Put in two Sleep(10000); statements, at the beginning and end of main. When you start the debug, do you see the breakpoint resolved properly (solid red dot at LHS of code window) or not (a non-solid dot with a "?" in it)?

Do you see the "hello world" output from your program? If not, put another output before the breakpoint. Do you see that? If not, you have major problems as the program is not even entering main.

If you do see the output(s), then there is most likely a mismatch between your program's symbols (which relate breakpoints to the source code?) and the binary that is run when you start the debug. Try running Project->Clean and then Project->Rebuild, if not already done.
 
Problem solved

Put in two Sleep(10000); statements, at the beginning and end of main. When you start the debug, do you see the breakpoint resolved properly (solid red dot at LHS of code window) or not (a non-solid dot with a "?" in it)?

Do you see the "hello world" output from your program? If not, put another output before the breakpoint. Do you see that? If not, you have major problems as the program is not even entering main.

If you do see the output(s), then there is most likely a mismatch between your program's symbols (which relate breakpoints to the source code?) and the binary that is run when you start the debug. Try running Project->Clean and then Project->Rebuild, if not already done.

Steve:

It works!!=D> I clean my project and then rebuild it. AND IT WORKS. Thank you so much!!I have spent countless time on this thing since last day:wall. Thank you again!!

Vadim, Alain and joe:

Thank you so much for devoting time for helping me. I really appreciate that!

Muting
 
Steve:

It works!!=D> I clean my project and then rebuild it. AND IT WORKS. Thank you so much!!I have spent countless time on this thing since last day:wall. Thank you again!!

Vadim, Alain and joe:

Thank you so much for devoting time for helping me. I really appreciate that!

Muting

Mismatched symbols and binaries are the bane of debugging on Windows. If we get binaries in our production system with mismatched or unarchived symbols, all process dumps are unusable.

The nice thing about running all this stuff on your own desktop is you can always just do Clean, Rebuild to ensure it's all in sync. Glad this helped.
 
Back
Top