Thread: program crashes at run time but not in debugger

  1. #1
    Registered User
    Join Date
    Dec 2011
    Posts
    36

    program crashes at run time but not in debugger

    What does it man when a program crashes at runtime, but does not crash during the step by step execution in a debugger?
    This particular program declares a large number of large size structure variables so probably the program crashing has something to do with this

    Thanks

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Maybe you simply did not step all the way through? Maybe you compiled with different options?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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.

  4. #4
    Registered User TheBigH's Avatar
    Join Date
    May 2010
    Location
    Melbourne, Australia
    Posts
    426
    Is there something wrong with asking the same question in multiple places?
    Code:
    while(!asleep) {
       sheep++;
    }

  5. #5
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    Quote Originally Posted by TheBigH View Post
    Is there something wrong with asking the same question in multiple places?
    I think the idea is that someone here might have put in some effort to answer the question and yet it may have already been answered on the other site.
    The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program runs fine, then crashes 5% of the time
    By mat1z in forum C++ Programming
    Replies: 5
    Last Post: 01-30-2011, 04:28 AM
  2. Visual Studio Just-In-Time Debugger Error
    By JudgeFudge in forum C++ Programming
    Replies: 1
    Last Post: 11-10-2010, 10:38 AM
  3. Getting a C# program with a manifest file to run in the debugger
    By Xarzu Athanasop in forum C# Programming
    Replies: 0
    Last Post: 01-18-2008, 06:34 PM
  4. Just-In-Time Debugger (Visual Studio 2005)
    By Darklighter in forum Tech Board
    Replies: 2
    Last Post: 10-10-2006, 01:43 PM
  5. No compile time errors, exe crashes.
    By RealityFusion in forum C++ Programming
    Replies: 13
    Last Post: 09-06-2005, 12:34 PM