gdb: "exited with status value:101"

Discussion in 'iPhone/iPad Programming' started by steve1717, Jun 16, 2008.

  1. macrumors newbie

    Joined:
    Jul 18, 2007
    #1
    Attempting to debug an iPhone app and I keep having the program shut down randomly with an error message of:

    Program exited with status value:101.

    Does anyone know what exactly that means or where it is possible to lookup gdb exit codes?

    Thanks!:confused:
     
  2. macrumors newbie

    Joined:
    Feb 27, 2008
    #2
    You could always download the GDB source code for your version of GDB and look it up from there. A google for GDB source revealed this site http://sourceware.org/gdb/current/ which may help?!
     
  3. thread starter macrumors newbie

    Joined:
    Jul 18, 2007
    #3
    It seems weird that I'd have to do that. For as prevalent as gdb is, I'm amazed that these exit codes aren't posted somewhere online in a table. Has anyone else received exit code 101? This is causing an app to crash on the device but does not occur on the simulator. Many thanks...
     
  4. macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #4
    Are you saying gdb itself exited with an exit status of 101 taking your app with it or your app exited with a 101 and gdb caught the termination status.

    Reading your post, it sounds as if we need to look into the latter scenario and not into gdb itself.
     
  5. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #5
    I think that the program is exiting with 101, not gdb. As such, exit() is being called with 101 as its argument.

    I don't know if you'll be able to set a breakpoint on exit and get a backtrace or not in this situation, but this is likely something going wrong in some cocoa functions since I'm guessing you didn't write code that called exit(101).

    -Lee
     
  6. thread starter macrumors newbie

    Joined:
    Jul 18, 2007
    #6
    Hi guys -- yes, the program itself is exiting with 101 and at random times too. Its unpredictable. The error doesn't occur on the simulator, just the device. :confused:
     
  7. macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #7
    You could try registering an exit handler function in main() via atexit(3) or on_exit(3) and breaking in there and viewing the stack trace.

    As lee pointed out above, this error code is probably not being thrown by any code you wrote, else you'd recognize it. Most likely, the choke is due to some library or framework you're linked into. If you have no idea where, one way to find out is to run your program under some tracing utility (on linux I use ltrace/strace for this all the time). On Darwin/OSX there's dtrace and dtruss at the command line, and the Instruments GUI in the /Developer/Tools tree.
     
  8. ajv
    macrumors newbie

    Joined:
    Feb 22, 2008
    #8
    I was having the same issue, but it seemed to go away when I rebooted the phone.
     
  9. macrumors newbie

    Joined:
    Jul 16, 2008
    #9
    Confirmed.

    I too had the same issue: "Program exited with status value:101."
    I followed avj's advice and rebooted my phone.

    no more error.

    Thanks ajv.
    :apple:
     
  10. macrumors newbie

    Joined:
    Sep 9, 2008
    #10
    This same bug is haunting me. I've tried restarting the phone but I see that 101 error haphazardly when testing on the device. I couldn't find any documentation on this error - any thoughts on what it means?
     

Share This Page