Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

steve1717

macrumors newbie
Original poster
Jul 18, 2007
20
0
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:
 

MrStevieP

macrumors newbie
Feb 27, 2008
22
0
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:

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?!
 

steve1717

macrumors newbie
Original poster
Jul 18, 2007
20
0
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...
 

yeroen

macrumors 6502a
Mar 8, 2007
944
2
Cambridge, MA
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.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
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
 

steve1717

macrumors newbie
Original poster
Jul 18, 2007
20
0
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:
 

yeroen

macrumors 6502a
Mar 8, 2007
944
2
Cambridge, MA
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.
 

ajv

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

cg16

macrumors newbie
Jul 16, 2008
1
0
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:
 

hnager

macrumors newbie
Sep 9, 2008
1
0
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.