I don't even know how to describe this error, but I need urgent help please!

This is a discussion on I don't even know how to describe this error, but I need urgent help please! within the C Programming forums, part of the General Programming Boards category; My application has a series of menus with games selection, right now, there's only 2 games available which I'll call ...

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    158

    I don't even know how to describe this error, but I need urgent help please!

    My application has a series of menus with games selection, right now, there's only 2 games available which I'll call game A and game B for now. If I start game B on the list, play it, then go back to the main menu and play game A, it crashes right after I select the difficulty level. It doesn't crash if it's the first game to be played. It also doesn't crash if I play game A first when I start the application, then play game B and then play again game A, only in the previous situation. I'm using ncurses and coding on Linux.

    Here's the error:
    http://img91.imageshack.us/my.php?im...eenshottq7.png

    I can't really post any code cause the whole code is very large at the moment and that is not even a specific error and I don't know where to start debugging... Any hints trying to find where the error is are very appreciated.

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Go into your system status and see how the memory is before and after the game B has run. Sounds like in the case where it runs before Game A, the exit is not proper, and there is a huge memory leak or some thread from the game, left still running.

    Aside from memory being watched, I'd look at the "top" command in a terminal window and see what's still running, both before and after the Game B is run before Game A.

    Obviously, there's a huge difference between how they're exiting when game A is run first, and how it's exiting after Game B is run first.

    I don't program in Linux, so that's all I can suggest.

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,437
    Why did that need an image of an unformatted screen to an ad-riddled hosting site?

    Couldn't you have taken like 10 more seconds to copy your terminal screen into a text editor, tidy it up a bit and just post that?

    If you're having trouble collecting stdio, then consider using the 'script' command.

    For debugging, look at valgrind or electric fence.
    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. BitWise Newbie - Needs Urgent Help
    By frodonet in forum C Programming
    Replies: 15
    Last Post: 09-26-2007, 12:58 PM
  2. Casting int to char, urgent question...
    By paulovitorbal in forum C Programming
    Replies: 2
    Last Post: 04-08-2006, 07:31 AM
  3. Linked List Need Help Urgent
    By ykchua in forum C Programming
    Replies: 5
    Last Post: 08-17-2004, 02:57 PM
  4. Urgent!!!
    By Mitchell in forum Windows Programming
    Replies: 5
    Last Post: 10-11-2001, 03:37 PM
  5. Urgent ! Need Advices On Windows Programming !
    By SonicWave in forum Windows Programming
    Replies: 6
    Last Post: 09-16-2001, 11:42 AM

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