Re: Weird SIGBUS errors
Re: Weird SIGBUS errors
- Subject: Re: Weird SIGBUS errors
- From: Kurt Revis <email@hidden>
- Date: Mon, 5 Nov 2001 18:48:36 -0800
On Monday, November 5, 2001, at 02:37 PM, David McCabe wrote:
Whenever the program is run, it works normally until the button is
pushed which brings up the manual. The man page flashes briefly on the
screen, and then the app dies. The following error is displayed in PB's
'Run' console:
ManViewer.app has exited due to signal 10 (SIGBUS).
This means that your program has crashed. Most likely, it is trying to
access memory outside of its address space, or dereference a null
pointer. Run it in the debugger; when it crashes, you'll see a
backtrace of where the crash happened. From there you should be able to
figure out what's going on.
I tried putting the following in main() :
sigblock(10);
You do NOT want to do this. You are getting the SIGBUS or SIGSEGV for a
reason--because your app is crashing. After this point, it's dead. You
can't just ignore the crash and go on afterwards (as you found out).
You need to find out why it's crashing, and fix that.
(BTW, the two signals are basically equivalent as far as you're
concerned--don't worry too much about which one you get specifically.)
---
Kurt Revis
email@hidden