954,546 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

segmentation fault

Hi guys,
could anyone tell me what segmentation fault means?
Thx

kaze139
Newbie Poster
4 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

Should be a thing of the past. In earlier years of computing, when 16bit operating systems were king, memory used to be addressed in segments/chunks of 64k (2**16). If you crossed one of those segments, you got a fault message. Python's memory manager shouldn't give you any problems like that! You might ask our friends in the C forum.

vegaseat
DaniWeb's Hypocrite
Moderator
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
 

It's the error that gets thrown in C (and other languages with direct memory access) when you try to write to or read from a piece of memory you don't own.

As vega said, you should never see this error in Python, since Python doesn't allow you direct access to memory.

Out of curiousity, why do you ask?

Jeff

jrcagle
Practically a Master Poster
608 posts since Jul 2006
Reputation Points: 92
Solved Threads: 156
 

thx for the replies. Hmm i'm using a function from the scipy lib called interpolate.(interp2d) It basically takes in 3 arrays and is supposed to perform interpolation. Whenever i use that function, python prints out the segmentation fault msg n then crashes :(

kaze139
Newbie Poster
4 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

Scipy is written in C, must be that memory management is out of reach for Python to increase speed of certain functions within scipy.

vegaseat
DaniWeb's Hypocrite
Moderator
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
 

Yeah, the seg fault is definitely not your fault. I recommend trying to find a work-around.

jrcagle
Practically a Master Poster
608 posts since Jul 2006
Reputation Points: 92
Solved Threads: 156
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You