Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What does it mean when:

I recieve an error message when I run the program normally but when I use Visual Studio 2010's debugger I don't? The error is somehow completely ignored.

What the program does is to iterate through the registry and display the default icons of file extensions and the error message is, that some dll cannot be opened. The error message does not crash the program. When I press OK the iteration continues normally.
Posted
Updated 31-Dec-10 2:19am
v2
Comments
Manfred Rudolf Bihy 31-Dec-10 8:21am    
Please copy the complete error message to your question. It might be helpfull to solve your problem.
Emre Gönültaş 31-Dec-10 8:25am    
It says: The program cant start because MSDATL3.dll is missing from your computer.

It is probably one of the dlls that I try to extract the icons.

When I press OK everything works fine.

I assume you can reproduce the problem, that is: when running executable along there is no exception, when back to debugger, you see exception.

From your information, I cannot tell the exact reason of the exception, so I'm trying to guess why the difference between running under debugger and from executable. First of all, you did not describe how exactly "error message" is shown.

One possible scenario is: there is no "error message", and the always application goes normally, under debugger or not, but in the middle if run-time exception is thrown; and exception handler takes this into account; and propagation of this exception further up to stack is not done (there is no re-throw or throwing another exception in the catch block).
For example, if the DLL you use to obtain icon is not found; so these icons are not used, but it still allows application to run. Why not? -- reasonable enough. Only you can sort out what exactly happens.

What you see under debugger can be just the debugger break point at this exception. It is not supposed to be shown during normal run-time (because exception handler suppress propagation), but the debugger is tuned to break execution at some or all exceptions, which let you to continue execution. The point of throwing or catching exception works like a break point. (This is optional, see below.)

When the debugger breaks at the exception, it shows exception message. This is not quite the same as "error message". You can control the set of this useful debugger options in VS via Debug -> Exceptions... window. For experiment, try to switch everything off (so the debugger won't break at the point where some kind of exception is thrown or caught) and see if your "error message" disappears. Don't forget that this in important debugger feature, so set this option properly -- it can help you a lot.
 
Share this answer
 
Comments
Espen Harlinn 28-Feb-11 15:36pm    
Good advice, my 5
Sergey Alexandrovich Kryukov 1-Mar-11 3:51am    
Thank you.
--SA
The MSDATL3.DLL file is associated with the data access components. Did you install/uninstall something recently?

 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900