Re: Access Violation Exception

Tech-Archive recommends: Speed Up your PC by fixing your registry



- 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
>
>


.



Relevant Pages

  • Re: Access Violation Exception
    ... This will create a PDB file when you compile ... > where the error occurred in the custom control. ... >> I have a vb6 app with various custom controls. ... App enters into a loop where it displays the exception error and it ...
    (microsoft.public.vb.winapi)
  • Re: Access Violation Exception
    ... This will create a PDB file when you compile ... | where the error occurred in the custom control. ... The app hooks into the clipboard notification ... App enters into a loop where it displays the exception error and it ...
    (microsoft.public.vb.winapi)
  • Re: Access Violation Exception
    ... >> - In VB6, in the project's properties, go to the Compile tab and select ... >> If the crash is caused by a custom control, you will have to compile that ... >>> I have a vb6 app with various custom controls. ... >>> first method that capture the Access Violation Exception. ...
    (microsoft.public.vb.winapi)
  • Re: VB Automation Error and xp sp2
    ... I have another app ... that uses the same control and that one work just fine. ... I just can't compile that VB program. ... >> TypeOf oCtrl Is sitmEdit Or TypeOf oCtrl Is TrueOleDBGrid60.TDBGrid ...
    (microsoft.public.vb.controls)
  • Re: Opinion wanted
    ... the details including the nature of my own app (which you mischaraterized ... correct the current control (provided that control is invalid but invalid ... causes you to validate controls that have already been ... largely discreditted for good reason and has very little use these days. ...
    (microsoft.public.dotnet.framework.windowsforms)