Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > What is a signal 11 (SIGSEGV)?

What is a signal 11 (SIGSEGV)?
Thread Tools
Moderator
Join Date: Sep 2000
Location: Irvine, CA
Status: Offline
Reply With Quote
Nov 21, 2002, 07:27 PM
 
I get that error when running a C++ program using PB. Thanks a lot.
{{{ mindwaves }}}
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Nov 21, 2002, 07:40 PM
 
Segmentation violation. It means your code tried to read or write from memory it didn't own (as in, memory it allocated for its own use).

Usually, this occurs when you read or write from an invalid pointer.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Junior Member
Join Date: Aug 2002
Location: Northeastern NV, USA
Status: Offline
Reply With Quote
Nov 21, 2002, 09:27 PM
 
I've also received this error from errant pointers, but the problem wasn't caused by the pointers being incorrectly assigned. The problem dwelled within a character array that was declared before the pointer variables. I read data (from an annex serial port) that was longer than expected and it over-wrote the bounds of my character array and spilled over into my pointer variables, thus corrupting them. The bottom line is, don't just look at all of the operations involving your pointer variables for the problem may be caused elsewhere...
     
Moderator
Join Date: Sep 2000
Location: Irvine, CA
Status: Offline
Reply With Quote
Nov 22, 2002, 09:43 AM
 
Hey, thanks, but does anyone know where I can find an explanation of all these types of errors?
{{{ mindwaves }}}
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Nov 22, 2002, 11:24 AM
 
Originally posted by mindwaves:
Hey, thanks, but does anyone know where I can find an explanation of all these types of errors?
You can find a basic explanation in the signal manpage. It lists the signals, the default action they cause, and a short description (e.g. "bus error," "segmentation violation") of what they mean. If you want something more in-depth, you could probably google something on them.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Moderator
Join Date: Sep 2000
Location: Irvine, CA
Status: Offline
Reply With Quote
Nov 22, 2002, 02:08 PM
 
Originally posted by Chuckit:

You can find a basic explanation in the signal manpage. It lists the signals, the default action they cause, and a short description (e.g. "bus error," "segmentation violation") of what they mean. If you want something more in-depth, you could probably google something on them.
Thanks.
{{{ mindwaves }}}
     
Mac Enthusiast
Join Date: Apr 2003
Location: manticore or people's republic of haven
Status: Offline
Reply With Quote
Feb 14, 2005, 08:08 PM
 
Originally posted by smeger:
Segmentation violation. It means your code tried to read or write from memory it didn't own (as in, memory it allocated for its own use).

Usually, this occurs when you read or write from an invalid pointer.
is it then trial-and-error to find out how to fix it? i just ran across this error and instead of posting a new thread with the same topic, thought i would ask about one that already talked about it. . .but i am not seeing how to fix it. thanks!!

nick
some people are like slinkys: they don't do much, but are fun to push down stairs.
     
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
Feb 14, 2005, 09:04 PM
 
What always bugged me about how errors are dealt with in Objective-C versus Java is in Java, I would get a nice stack trace automatically and I could track down the error pretty easily. My guess is the only way to deal with these types of errors in Objective-C is to use gdb, which I've never gotten around to learning yet.
     
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Feb 14, 2005, 09:32 PM
 
Originally posted by Ghoser777:
What always bugged me about how errors are dealt with in Objective-C versus Java is in Java, I would get a nice stack trace automatically and I could track down the error pretty easily. My guess is the only way to deal with these types of errors in Objective-C is to use gdb, which I've never gotten around to learning yet.
Xcode has a reasonably nice front end to GDB, which is quite easy to use. I find setting a breakpoint on [NSException raise] is handy.
     
Mac Elite
Join Date: Jul 2002
Status: Offline
Reply With Quote
Feb 14, 2005, 10:03 PM
 
Hillegass recommends as much in his book.

And holy zombie thread Batman! I think it would have been okay to create a new thread, instead of bumping this ancient one.
     
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Feb 14, 2005, 10:12 PM
 
"Most signals only go to ten. But this signal goes to eleven."
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
Feb 14, 2005, 10:47 PM
 
Originally posted by Ghoser777:
What always bugged me about how errors are dealt with in Objective-C versus Java is in Java, I would get a nice stack trace automatically and I could track down the error pretty easily. My guess is the only way to deal with these types of errors in Objective-C is to use gdb, which I've never gotten around to learning yet.
CrashReporter not good enough for you?
[Wevah setPostCount:[Wevah postCount] + 1];
     
Mac Enthusiast
Join Date: Apr 2003
Location: manticore or people's republic of haven
Status: Offline
Reply With Quote
Feb 15, 2005, 12:06 AM
 
Originally posted by Thinine:
Hillegass recommends as much in his book.

And holy zombie thread Batman! I think it would have been okay to create a new thread, instead of bumping this ancient one.
oops. guess i misunderstood how it was supposed to work with looking at previous messages . . . so to fix it (signal 11 error) just guess & check?
some people are like slinkys: they don't do much, but are fun to push down stairs.
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Feb 15, 2005, 02:09 AM
 
Originally posted by zanyterp:
oops. guess i misunderstood how it was supposed to work with looking at previous messages . . .
It's no biggie. There aren't really hard-and-fast rules for bumping threads (to my knowledge!). It's just a little jarring to see a post and realize it's something you said almost 3 years ago.

Originally posted by zanyterp:
so to fix it (signal 11 error) just guess & check?
Pretty much.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Mac Enthusiast
Join Date: Apr 2003
Location: manticore or people's republic of haven
Status: Offline
Reply With Quote
Feb 15, 2005, 06:23 PM
 
Originally posted by Chuckit:
It's no biggie. There aren't really hard-and-fast rules for bumping threads (to my knowledge!). It's just a little jarring to see a post and realize it's something you said almost 3 years ago.


Pretty much.
i can see how that would be rather jarring. i will keep that little scope in mind. and thanks for the answer.

nick
some people are like slinkys: they don't do much, but are fun to push down stairs.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:23 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2