Re: Access Violation Exception
- From: "Ivan Debono" <ivanmdeb@xxxxxxxxxxx>
- Date: Sat, 17 Sep 2005 07:57:05 +0200
I've solved the first bug. But I've got another bug and this is more strange
than the first.
When I close the app, I get a messagebox with an exclamation icon that says:
Runtime error '0'. The app ends normally though.
I've checked my source code, and there's no such messagebox that's being
displayed. The eventviewer shows nothing too.
Is there a way to locate the error source for this bug?
Thanks,
Ivan
"Someone" <nobody@xxxxxxx> schrieb im Newsbeitrag
news:wJAWe.42238$ct5.40294@xxxxxxxxxxxxx
>> Does the disassembly show the assembly code or the vb code?
>
> If you have the PDB file, it shows both in mixed mode, if you don't have
> it, it shows the assembly only.
>
>
> "Ivan Debono" <ivanmdeb@xxxxxxxxxxx> wrote in message
> news:OXLEJzpuFHA.3124@xxxxxxxxxxxxxxxxxxxxxxx
>> Cool that's great!! We have to test it over the weekend!!
>>
>> Does the disassembly show the assembly code or the vb code?
>>
>> Ivan
>>
>> "Someone" <nobody@xxxxxxx> schrieb im Newsbeitrag
>> news:z%uWe.38080$ct5.27777@xxxxxxxxxxxxx
>>> > I have only VC++.Net 2003
>>> > installed at the moment. Would it work with that too?
>>>
>>> Yes. Go to Tools|Debug Process, select your process and click Attach,
>>> and
>>> then select Native. You could View the call stack by going to
>>> Debug|Windows|Call Stack. Debug|Exception lets you control what happens
>> when
>>> an exception occurs. By default, it breaks in the debugger for Access
>>> Violation and most unhandled Win32 Exceptions.
>>>
>>> I forgot to mention in my last email that when you are viewing VB6
>>> source
>>> code, you could right click on a line and select "Go to Disassembly".
>>> This
>>> works in both VC 6.0 and .Net 2003, just tested both.
>>>
>>>
>>> "Ivan Debono" <ivanmdeb@xxxxxxxxxxx> wrote in message
>>> news:%23kxvLqouFHA.3316@xxxxxxxxxxxxxxxxxxxxxxx
>>> > I've been trying to do it with WinDbg but it somehow slowed down my
>>> > App
>> to
>>> > a
>>> > near halt. I didn't know I could do it with VC++6. I have only
>>> > VC++.Net
>>> > 2003
>>> > installed at the moment. Would it work with that too?
>>> >
>>> > Ivan
>>> >
>>> > "Someone" <nobody@xxxxxxx> schrieb im Newsbeitrag
>>> > news:njtWe.36391$ct5.22700@xxxxxxxxxxxxx
>>> >> - 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: Someone
- Re: Access Violation Exception
- References:
- Access Violation Exception
- From: Ivan Debono
- Re: Access Violation Exception
- From: Someone
- Re: Access Violation Exception
- From: Ivan Debono
- Re: Access Violation Exception
- From: Someone
- Re: Access Violation Exception
- From: Ivan Debono
- Re: Access Violation Exception
- From: Someone
- Access Violation Exception
- Prev by Date: Re: I Nominate this NewsGroup
- Next by Date: Re: info-balloon on the zone of textjp
- Previous by thread: Re: Access Violation Exception
- Next by thread: Re: Access Violation Exception
- Index(es):
Relevant Pages
|