?
Solved

Exception Problems

Posted on 1997-10-03
5
Medium Priority
?
789 Views
Last Modified: 2008-03-17
I have some code (>100,000 lines) that occasionally throughs up the following error on a NT 3.51 (SP5) system.

myapp.exe - Application Error
Exception Unknown - software exception (0xC000008) occured in the application at location 0x77FC02CD.

The location is in NTDLL.DLL, and the exception (0xC0000008) indicates that an invalid handle has been referenced.

My problem is that when this popup box appears, there is no option to debug (only option in OK), even though I have setup the system debugber option in AEDebug registry key. Other exceptions on this system do allow you to debug.

So, my questions are :-
1) Why no CANCEL option, so that I can debug (or capture Dr Watson output)?
2) What can cause this error ? If I write a quick program that does a CloseHandle(0xabababab), then under the debugger this causes a First Chance exception that is handled (by NTDLL.DLL ?). So, when I run this normally, no exceptions are thrown.

Because this happens at random, involving thousands of executions of this application, I need some way of gathering a stack-back trace, or at least some indication of the type of scenario that could cause this.

0
Comment
Question by:gbmgeor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:gwalters
ID: 1170760
Select OK, then check out %SYSTEMROOT%\drwtsn32.log

0
 

Author Comment

by:gbmgeor
ID: 1170761
Dr Watson log is not generated when you click OK.
0
 
LVL 3

Expert Comment

by:gwalters
ID: 1170762
Were there any other log files in "c:\winnt\"?  

Please bear with me, what I told you worked in NT4.0; I don't know what differences there may be in 3.51.

Run drwtsn32.exe; it may have a different path set for the log file.


0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 400 total points
ID: 1170763
There are two functions to try using to catch this exception and hopefully at least have a call stack:

  _set_se_translator();
  SetUnhandledExceptionFilter();

Take a look at these functions in the online help and that should give you a good start on how to catch these types of unhandled problems.

This should at least give you the ability to set a breakpoint in the debugger.
0
 

Author Comment

by:gbmgeor
ID: 1170764
Thui, I've looked into these in the past, but I was under the impression that the default behaviour would be the option to trigger the default system debugger. What I would really like are some scenarios that could cause this exception.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question