Crash outside IDE - Programmer

This is a discussion on Crash outside IDE - Programmer ; I have an extensive application that was written using Visual C++ 6.0. On one of the dialogs when I click "OK" the application crashes (memory read error) but only outside the IDE in normal release build. A debug build works ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Crash outside IDE

  1. Crash outside IDE

    I have an extensive application that was written using Visual C++ 6.0.
    On one of the dialogs when I click "OK" the application crashes
    (memory read error) but only outside the IDE in normal release build.
    A debug build works just fine as well as it runs just fine in the VC++
    IDE.

    Any ideas how I can trap this error? The error reported is your
    typical "tried to read 0x00000018 etc. etc."

    Any and all help will be greatly appreciated.

    Thanks,

    Chetan

  2. Re: Crash outside IDE

    Chetan wrote:
    > I have an extensive application that was written using Visual C++ 6.0.
    > On one of the dialogs when I click "OK" the application crashes
    > (memory read error) but only outside the IDE in normal release build.
    > A debug build works just fine as well as it runs just fine in the VC++
    > IDE.
    >
    > Any ideas how I can trap this error? The error reported is your
    > typical "tried to read 0x00000018 etc. etc."
    >
    > Any and all help will be greatly appreciated.
    >
    > Thanks,
    >
    > Chetan


    Turn on the generation of debug info in your release build. (In the
    C/C++ settings turn on Debug Info. In the Link settings turn on
    Generate Debug Info.)

    Then you can look at the call stack and your variables in the debugger
    when the release build crashes.

    --
    Scott McPhillips [VC++ MVP]


  3. Re: Crash outside IDE

    Scott,

    I'm way out of my league here. I turned on the debug info option "Line
    numbers only" in all my projects. Basically I have a bunch of DLLs
    that are then dynamically loaded at run-time by the executable. After
    looking around some I realise that this will produce a pdb file. I can
    open this pdb file in the VC++ IDE but can't quite make heads or tails
    out of the file.

    Is there a special program I open this file with? What am I looking
    for here? How does this help me? Your help is tremendously
    appreciated.

    Chetan

    "Scott McPhillips [MVP]" wrote in message news:<242dnf0A2dXsf4fdRVn-hw@comcast.com>...
    > Chetan wrote:
    > > I have an extensive application that was written using Visual C++ 6.0.
    > > On one of the dialogs when I click "OK" the application crashes
    > > (memory read error) but only outside the IDE in normal release build.
    > > A debug build works just fine as well as it runs just fine in the VC++
    > > IDE.
    > >
    > > Any ideas how I can trap this error? The error reported is your
    > > typical "tried to read 0x00000018 etc. etc."
    > >
    > > Any and all help will be greatly appreciated.
    > >
    > > Thanks,
    > >
    > > Chetan

    >
    > Turn on the generation of debug info in your release build. (In the
    > C/C++ settings turn on Debug Info. In the Link settings turn on
    > Generate Debug Info.)
    >
    > Then you can look at the call stack and your variables in the debugger
    > when the release build crashes.


  4. Re: Crash outside IDE

    I have been able to narrow down the source of the error through "trial
    and error". It comes down to a combo box. When I select the "24th"
    member in the combo-box list, it crashes. It does not matter what the
    actual value is, just selecting the 24th element does it. It seems
    that the crash is coming from an ASSERT statement in the base MFC
    class. It is basically checking to see if the address provided for the
    COBList is valid. It crashes during this validation. You can select
    any entry other than 24, higher or lower and it will be ok. Although
    it seems that higher values eventually cause the system to crash
    (delayed crash).

    Any ideas or help will be appreciated.

    Thanks,

    Chetan

    chetan.chothani@adaptiveresources.com (Chetan) wrote in message news:...
    > Scott,
    >
    > I'm way out of my league here. I turned on the debug info option "Line
    > numbers only" in all my projects. Basically I have a bunch of DLLs
    > that are then dynamically loaded at run-time by the executable. After
    > looking around some I realise that this will produce a pdb file. I can
    > open this pdb file in the VC++ IDE but can't quite make heads or tails
    > out of the file.
    >
    > Is there a special program I open this file with? What am I looking
    > for here? How does this help me? Your help is tremendously
    > appreciated.
    >
    > Chetan
    >
    > "Scott McPhillips [MVP]" wrote in message news:<242dnf0A2dXsf4fdRVn-hw@comcast.com>...
    > > Chetan wrote:
    > > > I have an extensive application that was written using Visual C++ 6.0.
    > > > On one of the dialogs when I click "OK" the application crashes
    > > > (memory read error) but only outside the IDE in normal release build.
    > > > A debug build works just fine as well as it runs just fine in the VC++
    > > > IDE.
    > > >
    > > > Any ideas how I can trap this error? The error reported is your
    > > > typical "tried to read 0x00000018 etc. etc."
    > > >
    > > > Any and all help will be greatly appreciated.
    > > >
    > > > Thanks,
    > > >
    > > > Chetan

    > >
    > > Turn on the generation of debug info in your release build. (In the
    > > C/C++ settings turn on Debug Info. In the Link settings turn on
    > > Generate Debug Info.)
    > >
    > > Then you can look at the call stack and your variables in the debugger
    > > when the release build crashes.


  5. Re: Crash outside IDE

    once you've compiled your release mode but with debug info on as Scott
    suggested, you can run inside the IDE (F5). Now when it crashes, you'll
    be in the debugger and be able to see the source.

    --
    David Strip Eastman Kodak Company
    david.strip@kodak.com 2901 Juan Tabo NE, Suite 210
    505-294-8515 Albuquerque, NM 87112-1881
    505-294-8565 (fax)



  6. Re: Crash outside IDE

    Never mind. I found the bug and fixed it. A very strange bug that
    didn't surface until now and then only in this extremely strange way.

    chetan.chothani@adaptiveresources.com (Chetan) wrote in message news:...
    > Scott,
    >
    > I'm way out of my league here. I turned on the debug info option "Line
    > numbers only" in all my projects. Basically I have a bunch of DLLs
    > that are then dynamically loaded at run-time by the executable. After
    > looking around some I realise that this will produce a pdb file. I can
    > open this pdb file in the VC++ IDE but can't quite make heads or tails
    > out of the file.
    >
    > Is there a special program I open this file with? What am I looking
    > for here? How does this help me? Your help is tremendously
    > appreciated.
    >
    > Chetan
    >
    > "Scott McPhillips [MVP]" wrote in message news:<242dnf0A2dXsf4fdRVn-hw@comcast.com>...
    > > Chetan wrote:
    > > > I have an extensive application that was written using Visual C++ 6.0.
    > > > On one of the dialogs when I click "OK" the application crashes
    > > > (memory read error) but only outside the IDE in normal release build.
    > > > A debug build works just fine as well as it runs just fine in the VC++
    > > > IDE.
    > > >
    > > > Any ideas how I can trap this error? The error reported is your
    > > > typical "tried to read 0x00000018 etc. etc."
    > > >
    > > > Any and all help will be greatly appreciated.
    > > >
    > > > Thanks,
    > > >
    > > > Chetan

    > >
    > > Turn on the generation of debug info in your release build. (In the
    > > C/C++ settings turn on Debug Info. In the Link settings turn on
    > > Generate Debug Info.)
    > >
    > > Then you can look at the call stack and your variables in the debugger
    > > when the release build crashes.


+ Reply to Thread