Can not debug a crash

This is a discussion on Can not debug a crash within the Windows Programming forums, part of the Platform Specific Boards category; I'm using MSVC++ 6 to create a program using c. I get a crash when I do a specific action ...

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    61

    Can not debug a crash

    I'm using MSVC++ 6 to create a program using c. I get a crash when I do a specific action (in this case : click on the console window when my openGL window is open).

    Normally I detect crashes by printing to the console to find where the crash occurs. The weird thing is that in this case the program fails to crash when I periodically print something to the console. I also tried the debugger in MSVC, but my debug build fails to crash too.

    Does anyone have an idea how to solve this ? Is there an easy way to get a back-trace of the call stack ?

    Thanks,

    hannibar

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    go to your event handler and manually trace the actions that take place. try adding MessageBox es and stuff places. Put in debug assertions for things you "know" to work.

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,671
    http://catb.org/~esr/jargon/html/H/heisenbug.html

    Also bear in mind that the cause (where the bug really is), and effect (where it shows up) are not necessarily in the same place, especially if memory corruption is at work.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary not built with debug info - why?
    By ulillillia in forum C Programming
    Replies: 15
    Last Post: 12-11-2008, 12:37 AM
  2. makefiles - debug & release?
    By cpjust in forum C Programming
    Replies: 6
    Last Post: 10-26-2007, 04:00 PM
  3. Results in Debug and Release mode are different
    By jaro in forum C Programming
    Replies: 11
    Last Post: 05-27-2006, 11:08 AM
  4. Ask about Debug Assert Failed
    By ooosawaddee3 in forum C++ Programming
    Replies: 0
    Last Post: 04-24-2002, 11:07 PM
  5. Why does this crash in release version but not debug?
    By Dual-Catfish in forum C++ Programming
    Replies: 1
    Last Post: 04-03-2002, 05:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21