Re: Access Violation Exception
- From: "Someone" <nobody@xxxxxxx>
- Date: Fri, 16 Sep 2005 02:08:29 -0400
- In VB6, in the project's properties, go to the Compile tab and select
"Create symbolic debug info". This will create a PDB file when you compile
your project.
- Remove the calls to SetUnhandledExceptionFilter.
- Save and Compile.
- Run the EXE from Windows Explorer.
- Go to VC++ 6.0|File|Close Workspace.
- Go to Build|Start Debug|Attach to process, and select your running EXE.
- Go to View|Debug Windows, and make sure that "Call Stack" window is
visible.
- Let it crash.
- The call stack shows you where the problem is. One of the lines will point
to your source code, when you double click on that, it will show you the
source code and points to the exact line that caused the error.
- If the program closed normally, or you want to try again, go to
Build|Execute <Your EXE file name>.
- There are some settings that you could change, if necessary, in
Project|Settings|Debug.
If the crash is caused by a custom control, you will have to compile that
with debug info as well, otherwise, VC++ will not show you the source line
where the error occurred in the custom control. If this happens, the line
highlighted in your code is a property or method call to that custom
control.
"Ivan Debono" <ivanmdeb@xxxxxxxxxxx> wrote in message
news:eErAp$euFHA.2064@xxxxxxxxxxxxxxxxxxxxxxx
> Hi all,
>
> I have a problem that's driving me crazy!!!
>
> I have a vb6 app with various custom controls. One of them is the
> CommandBar
> control from vbAccelerator. The app hooks into the clipboard notification
> queue so that it knows what's being copied and pasted. All controls that I
> use (apart from the CommandBar) have 2 distinct error handling functions:
>
> 1. SetUnhandledExceptionFilter
> 2. Log writing
>
> The 2nd method simply writes to a text file in places where I add the
> function and always in the error handling routine most functions. It is
> the
> first method that capture the Access Violation Exception.
>
> The problem has 2 symptons:
>
> 1. App just crashes with no error message
> 2. App enters into a loop where it displays the exception error and it
> looks
> like the source is in the CommandBar control (the messagebox title says
> so!)
>
> I've used the CommandBar control a gazillion times and I never had
> problems
> with it. It is only this combination that is causing the error. I have to
> add the control itself doesn't handle errors at all (or maybe in a couple
> of
> places only), and there's quite a few lines of code. Problem is that I
> can't
> run it the IDE as it won't work, so compiling everything and running the
> app.
>
> Before I start adding Logwrite functions in each and every function of the
> control, is there a way to geenrate more information on the exception,
> such
> as the function (and/or line) that is causing it. Can I create a pdb file
> that can be used with some sort of tool to help me trace the exception
> source? Are there such tools available?
>
> Help!!
>
> Ivan
>
>
.
- Follow-Ups:
- Re: Access Violation Exception
- From: [SolarAngel]
- Re: Access Violation Exception
- From: Ivan Debono
- Re: Access Violation Exception
- References:
- Access Violation Exception
- From: Ivan Debono
- Access Violation Exception
- Prev by Date: Re: Automating Fax In Windows
- Next by Date: Re: Access Violation Exception
- Previous by thread: Access Violation Exception
- Next by thread: Re: Access Violation Exception
- Index(es):
Relevant Pages
|