views:

1534

answers:

2

Hi

My app crashes at a particular point when testing on the phone. The console shows this message

Tue Jan 27 15:47:14 unknown SpringBoard[22] <Warning>: Application <SBApplication: 0x3f26180> com.myprof.test activate:  deactivate:  exited abnormally with signal 10: Bus error

Where can I find a list with the meanings of all these signals? Thanks.

Edit: Is there a way of knowing why the error occurs? according to the signal man page, signal 10 is Bus error (which is BTW, clear from the error) but what does it mean and how do I remove it?

Thanks again

+3  A: 

The signal man page

Martin Pilkington
Thanks Martin. Is there a way of knowing why the error occurs? according to the signal man page, signal 10 is Bus error (which is clear from the error) but what does it mean and how do I remove it?
lostInTransit
Generally SIGBUS is a memory error. I'd check your memory management and see if you aren't over releasing something. Just found a better link that explains possible causes on CocoaDev: http://www.cocoadev.com/index.pl?SignalsSentOnCrash
Martin Pilkington
+1  A: 

A bus error means that you're trying to access memory that the CPU can't physically access. As opposed to a segmentation fault, which means you're accessing memory that doesn't belong to you. Either way, you probably have a stray pointer.

Try using the memory allocation debugger in XCode (Guard Malloc). It will only run in the simulator and slows things down a lot, but I find it very useful.

Stephen Darlington
Thanks Stephen. I could not find the error even after using Guard Malloc. The problem is that I am not getting any error when running the app on the simulator. It is causing trouble only with the device. Any suggestions? Thanks.
lostInTransit
Unfortunately I don't think there's a simple, one-click way of finding out where the problem is. Indeed, you're probably deallocating memory in one place and getting the crash elsewhere. It's probably down to breakpoints and single-stepping.
Stephen Darlington