View Single Post
  #3   Spotlight this post!  
Unread 10-01-2015, 19:49
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Segmentation Fault with PuTTy

Quote:
Originally Posted by virtuald View Post
A segmentation fault means we screwed something up.
More specificially, this happens when a python extension (written in C) tries to access a memory beyond reach.

You can trace it in following ways:

1.Add sys.settrace at the very first line of the code.

2.Use gdb at the command prompt

gdb python
(gdb) run /path/to/script.py
## wait for segfault ##
(gdb) backtrace
## stack trace of the c code

My python is rather rusty. Let me know if this method doesn't work
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
Reply With Quote