Re: Debugging help - random crashes (1f48cbc1)

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

From: Charles Evans (charles_evans_at_hotmail.com)
Date: 01/28/05


Date: Fri, 28 Jan 2005 16:30:30 -0000

Oleg, thanks for the advice. I finally got it to crash through the debugger
but i couldn't see any managed calls in the call stack, only unmanaged
calls. The output window gave me some information that has confused me even
more.

The following two ADO dll's got unloaded (log below):

Unloaded 'C:\Program Files\Common Files\System\ado\msadox.dll'
Unloaded 'C:\Program Files\Common Files\System\ado\msado15.dll'

And then the application crashed with the following in the output window:

First-chance exception at 0x4de7640a in App.exe: 0xC0000005: Access
violation reading location 0x4de7640a.
Unhandled exception at 0x4de7640a in App.exe: 0xC0000005: Access violation
reading location 0x4de7640a.

This address is where msado15.dll was loaded so now i'm thinking my
application is trying to access the objects after they've been unloaded.
The calls to ADO and ADOX are all within one function and all variables are
only in scope for that function. One of the objects, an
ADODB.ConnectionClass, is supplied as a parameter to an ADOX.CatalogClass
object and a call on the CatalogClass object is executed near the end of the
function. Would the GC kill the ConnectionClass object if it wasn't
referenced again within the function??

"Oleg Starodumov" <com-dot-debuginfo-at-oleg> wrote in message
news:OV2ekMGBFHA.2792@TK2MSFTNGP15.phx.gbl...
>
>> It's a C# application but references the ADO libraries to allow me to
>> "link"
>> a DBF file into an Access database. This is unmanaged code and even if i
>> get the problem while running under the debugger, i get a windows
>> application error dialog and the debugger knows nothing about it.
>
> Try to turn on unmanaged debugging, then the debugger should be able
> to catch the exception.
>
> Project properties | Configuration Properties | Debugging |
> "Enable Unmanaged Debugging" = True
>
> If it succeeds and the debugger stops on the exception, check call stacks
> of managed threads and see if there is one that is calling into ADO,
> or something related.
>
> Regards,
> Oleg
>
>
>
>



Relevant Pages

  • Re: Implementing Exception Handling in a VM
    ... Why does a debugger require to walk the stack twice? ... Delphi) to only pop up the debugger if the exception isn't caught deeper ... MP> EXCEPTION_REGISTRATION structures until it finds a handler for the ...
    (comp.compilers)
  • Re: You wanted defensive writing...
    ... Couldn't you have set the debugger to break on all exceptions? ... > I've created an application that loads Caudill's TreeListView as its ... > I commented the line that called the insertion on start-up, ... > The exception caught me unaware, ...
    (microsoft.public.dotnet.csharp.general)
  • Re: You wanted defensive writing...
    ... Couldn't you have set the debugger to break on all exceptions? ... > I've created an application that loads Caudill's TreeListView as its ... > I commented the line that called the insertion on start-up, ... > The exception caught me unaware, ...
    (microsoft.public.dotnet.general)
  • Re: Problem with KITL?
    ... > Enable kernel debugger ... This OK if KdStub stumbling on its own BP. ... Exception in debugger, Addr=0x801AB864 - attempting to recover ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Implementing Exception Handling in a VM
    ... but it basically involves walking up the call stack. ... If you don't need the debugger ... IMO a pre-search for an exception handler is required only, ...
    (comp.compilers)