Exception
-
First-chance exception in DWB.exe (OLEAUT32.DLL): 0xC0000005: Access Violation. Could any one tell me the meaning of the above sentence ? i got this exception while working on VC6 and COM components. thanks in advance, Anandi VC
Anandi.VC wrote:
Could any one tell me the meaning of the above sentence ?
You did something wrong within your program. That's about all we can say about it. But I know somebody who can help you much more than us, he is called Mr. Debugger :) Joke aside, if you want to have more information about the problem, use your debugger: step into your program around the code which causes the problem, check the call stack, verify the different variables...
Cédric Moonen Software developer
Charting control [v1.4] -
First-chance exception in DWB.exe (OLEAUT32.DLL): 0xC0000005: Access Violation. Could any one tell me the meaning of the above sentence ? i got this exception while working on VC6 and COM components. thanks in advance, Anandi VC
Invalid memory access. (buggy pointer?) :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
Anandi.VC wrote:
Could any one tell me the meaning of the above sentence ?
You did something wrong within your program. That's about all we can say about it. But I know somebody who can help you much more than us, he is called Mr. Debugger :) Joke aside, if you want to have more information about the problem, use your debugger: step into your program around the code which causes the problem, check the call stack, verify the different variables...
Cédric Moonen Software developer
Charting control [v1.4]Cedric Moonen wrote:
he is called Mr. Debugger
lol .... :jig:
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
-
First-chance exception in DWB.exe (OLEAUT32.DLL): 0xC0000005: Access Violation. Could any one tell me the meaning of the above sentence ? i got this exception while working on VC6 and COM components. thanks in advance, Anandi VC
Anandi.VC wrote:
First-chance exception in DWB.exe (OLEAUT32.DLL): 0xC0000005: Access Violation. Could any one tell me the meaning of the above sentence ?
can be invalid pointer access. and what is First-Chance exception? When Exception Occurs debugger get notified and this first pass is called "First-Chance Exception", the debugger can then decide to pass to application to run normally if the exception was not handled by the application then the debugger gets notified again and is "second-chance exception" where the application must crash. [First and second chance exception handling^] Several cases the first chance exceptions don’t necessarily need to be dangerous and does not mean application's code is not proper. for instance the following code causes first chance exception message to be written in output window
try
{
throw 100;
}
catch (...)
{
cout << "exception";
}try // SEH is enabled
{
int *ptr = (int *)0x01;
*ptr = 1000;
}
catch (...)
{
cout << "exception";
}but the application handled the exception, so you don't get second chance exception. This may not be a buggy code, but if it is buggy you cannot find the exact position of exception as the default settings of the debugger won't break execution at first-chance exception, you can enable the debugger to break at First -chance Exception so that you can get the exact position. say in VS2005, "Debug->Exceptions: then check mark exception in the list". I don't remember in VS6.0 (its time to throw these old stuff dude ;) )
modified on Thursday, May 8, 2008 11:05 AM
-
Anandi.VC wrote:
First-chance exception in DWB.exe (OLEAUT32.DLL): 0xC0000005: Access Violation. Could any one tell me the meaning of the above sentence ?
can be invalid pointer access. and what is First-Chance exception? When Exception Occurs debugger get notified and this first pass is called "First-Chance Exception", the debugger can then decide to pass to application to run normally if the exception was not handled by the application then the debugger gets notified again and is "second-chance exception" where the application must crash. [First and second chance exception handling^] Several cases the first chance exceptions don’t necessarily need to be dangerous and does not mean application's code is not proper. for instance the following code causes first chance exception message to be written in output window
try
{
throw 100;
}
catch (...)
{
cout << "exception";
}try // SEH is enabled
{
int *ptr = (int *)0x01;
*ptr = 1000;
}
catch (...)
{
cout << "exception";
}but the application handled the exception, so you don't get second chance exception. This may not be a buggy code, but if it is buggy you cannot find the exact position of exception as the default settings of the debugger won't break execution at first-chance exception, you can enable the debugger to break at First -chance Exception so that you can get the exact position. say in VS2005, "Debug->Exceptions: then check mark exception in the list". I don't remember in VS6.0 (its time to throw these old stuff dude ;) )
modified on Thursday, May 8, 2008 11:05 AM
Rajkumar R wrote:
try // SEH is enabled { int *ptr = (int *)0x01; *ptr = 1000; } catch (...) { cout << "exception"; }
This construct is non-standard. The C++ standard states that
catch
can only catch exceptions explicitly thrown via thethrow
keyword. Microsoft got it wrong but later added the /EH[^] switch to select the old non-standard behaviour or the behaviour mandated by the C++ standard.Steve
-
Rajkumar R wrote:
try // SEH is enabled { int *ptr = (int *)0x01; *ptr = 1000; } catch (...) { cout << "exception"; }
This construct is non-standard. The C++ standard states that
catch
can only catch exceptions explicitly thrown via thethrow
keyword. Microsoft got it wrong but later added the /EH[^] switch to select the old non-standard behaviour or the behaviour mandated by the C++ standard.Steve
Yes steve, you are correct that's "Microsoft specific" . 5! for the description for what i mentioned by the comment // SEH is enabled.
-
Anandi.VC wrote:
First-chance exception in DWB.exe (OLEAUT32.DLL): 0xC0000005: Access Violation. Could any one tell me the meaning of the above sentence ?
can be invalid pointer access. and what is First-Chance exception? When Exception Occurs debugger get notified and this first pass is called "First-Chance Exception", the debugger can then decide to pass to application to run normally if the exception was not handled by the application then the debugger gets notified again and is "second-chance exception" where the application must crash. [First and second chance exception handling^] Several cases the first chance exceptions don’t necessarily need to be dangerous and does not mean application's code is not proper. for instance the following code causes first chance exception message to be written in output window
try
{
throw 100;
}
catch (...)
{
cout << "exception";
}try // SEH is enabled
{
int *ptr = (int *)0x01;
*ptr = 1000;
}
catch (...)
{
cout << "exception";
}but the application handled the exception, so you don't get second chance exception. This may not be a buggy code, but if it is buggy you cannot find the exact position of exception as the default settings of the debugger won't break execution at first-chance exception, you can enable the debugger to break at First -chance Exception so that you can get the exact position. say in VS2005, "Debug->Exceptions: then check mark exception in the list". I don't remember in VS6.0 (its time to throw these old stuff dude ;) )
modified on Thursday, May 8, 2008 11:05 AM