Calling delete Crashes my Program

This is a discussion on Calling delete Crashes my Program within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by matsp Sure you can: vector: perator[] -- Mats God I hate that auto-smiley thing....

  1. #16
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,274
    Quote Originally Posted by matsp View Post
    Sure you can:
    vector:perator[]

    --
    Mats
    God I hate that auto-smiley thing.

  2. #17
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Me too. I just edited the post to "disable smilies".

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #18
    Registered User
    Join Date
    Nov 2006
    Posts
    519
    Can't you just try to put out the contents of your array right before the deletion? And If you get just garbage when move back that output in the execution path until you identified the place that corrupts you memory or pointers.


    Quote Originally Posted by grumpy View Post
    Ironically, one of the common mistakes of newbies is to try and find the cause of a crash by stepping FORWARD, in a debugger, from the crash.
    How can I step forward from a crash on (any crash I've seen so far had the surprising side effect of process termination)?

  4. #19
    Registered User
    Join Date
    Jun 2005
    Posts
    6,657
    Quote Originally Posted by pheres View Post
    How can I step forward from a crash on (any crash I've seen so far had the surprising side effect of process termination)?
    Depends on your debugger; several available debuggers return control to the user when an error condition is encountered within the program. And a lot of users insist on then stepping forward, in the debugger, from that point.

  5. #20
    Registered User
    Join Date
    Nov 2006
    Posts
    519
    Ah, ok. Gdb, the debugger I'm using most of the time, doesn't seem to do that. That exactly is the sense of "returning control" in the moment the process is terminated by the OS?

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 01:27 PM
  2. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  3. My I/O Program crashes, I need some help
    By Guti14 in forum C Programming
    Replies: 4
    Last Post: 09-24-2004, 02:16 AM
  4. program crashes
    By Strut in forum Linux Programming
    Replies: 3
    Last Post: 02-10-2002, 10:49 AM
  5. Program crashes and I can't figure out why
    By Unregistered in forum C Programming
    Replies: 6
    Last Post: 09-19-2001, 06:33 PM

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