Re: Access Violation Exception

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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


.



Relevant Pages

  • Re: Access Violation Exception
    ... >> Is there a way to locate the error source for this bug? ... >> I've solved the first bug. ... The app ends normally though. ... >> I've checked my source code, and there's no such messagebox that's being ...
    (microsoft.public.vb.winapi)
  • RE: Catch FatalExecutionEngineError - MSScriptControl
    ... UnhandledExceptionEventArgs args) ... Exception e = args.ExceptionObject; ... This crashes my app with an FatalExecutionEngineError which I cannot ... This error may be a bug in the CLR or in the unsafe or non- ...
    (microsoft.public.dotnet.framework.interop)
  • Re: .NET CF for ARMv4I
    ... You have a bug in your app. ... Debug it. ... A managed Exception occured at RuntimeConstructorInfo::Invoke+0x6a ...
    (microsoft.public.pocketpc.developer)
  • Re: Display a message each time functions are called
    ... This app is basically an e-Learning and content ... That does not sound like a problem with client-side scripting either. ... Not a client-side script problem either, unless there was a bug in the user ... very well for reporting: ...
    (comp.lang.javascript)
  • Re: pause simple but usefull
    ... than a C compiler that sees much heavier use (hence bug reports). ... I am of course speaking in the context of if more people would do asm and work together on it, this would safe time for them, and for their users. ... It is quite simple to make an app run correctly from a single directory, without ever toughing the registry and ect. ... Now try to imagine we download and install, something like may 10-100 apps a year, with updates and etc, and each spend from 10 seconds to several minutes just to install, some even spend the same amount of time to unistall. ...
    (alt.lang.asm)