Debugging and unhandled exception

This is a discussion on Debugging and unhandled exception within the Windows Programming forums, part of the Platform Specific Boards category; Hi. Currently when I launch my program it causes an unhandled exception and crashes, but everything works fine while debugging. ...

  1. #1
    Registered User
    Join Date
    Jan 2006
    Location
    Latvia
    Posts
    102

    Debugging and unhandled exception

    Hi. Currently when I launch my program it causes an unhandled exception and crashes, but everything works fine while debugging. I tried to tamper with the optimizations, but they are already off. What could be the reason for this?

    Is there any way to somehow debug my code? Which options should I change to be able to do so?

    Thanks, I can provide more information if needed.


    Using MSVC++2008

  2. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    bad pointers.

    is this C/C++ or C#. MFC, ATL, STL, Win32 API?

    Could you post the code that is crashing?

    Have you tried running the debugger to find the line that crashes?
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    Quote Originally Posted by Overlord View Post
    Is there any way to somehow debug my code?
    Log progress to a file, narrowing the logged secions down until you find the cause.

    Exception handlers (try/catch)

    Message boxes.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unhandled exceptions (throw with no try)
    By Mario F. in forum C++ Programming
    Replies: 3
    Last Post: 07-01-2006, 06:31 AM
  2. Unhandled exception: User breakpoint
    By glUser3f in forum C++ Programming
    Replies: 3
    Last Post: 10-02-2003, 04:20 PM

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