Re: SIGBUS and SIGSEGV
Re: SIGBUS and SIGSEGV
- Subject: Re: SIGBUS and SIGSEGV
- From: Isaac Sherman <email@hidden>
- Date: Thu, 07 Feb 2002 11:55:01 -0500
on 2/7/02 8:02 AM, you, Nick, at the address, email@hidden, wrote:
>
My apologies for bothering the list with another fairly simple question,
>
but it's been bothering me for a while and doesn't seem to be documented
>
very well.
>
>
Recently, my application has been crashing (after closing a sheet,
>
although I'm not sure that 's the real cause of the problem) during
>
runtime because of signal 10 (SIGBUS) and signal 11 (SIGSEGV) errors.
A SIGSEGV occurs when writing to memory that you don't have the right to. A
SIGBUS is when you're trying to read from it. I run into this a lot when
improperly allocating/autoreleasing memory. Look over your code closely.
Also, run the debugger. The program will probably quit from EXC_BAD_ACCESS
If the last few frames have to do with popping the auto-release pool, then
that's your problem. Beyond that, try using NSLog statements to tell you
where your program is going. If you're dealing with custom classes, don't
forget to retain any variables they may contain.
>
Also, I seem to get one of the two at the same point in my program,
>
although it seems almost random which one is shown by PB after the crash.
If mine crashes, it's usually SIGBUS. It doesn't anymore, though. But it
would also SIGSEGV quite frequently.
HTH,
--
Isaac Sherman
MotaSoft Software (forthcoming)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.