runeven wrote:jojopi wrote:Are you running the script with sudo? That will inhibit your shell's notification if Python receives a fatal signal. After the script exits try:
A result greater than 128 means that Python was killed.
Now it exits again and here was what it returned:
139 is SIGSEGV
(You subtract 128, then look up the result [11] in /usr/include/arm-linux-gnueabihf/bits/signum.h)
Segmentation violation is general Unix-exe for trying to access memory you shouldn't be accessing. Whether this is due to a bug in your code or in the Python interpreter remains to be seen...
Anyway, these kinds of problems can be tricky to track down - generally because your program just silently exits and you're left scratching your head as to what happened and why. I had a similar issue recently where a program (Not written in Python and not written by me) was mysteriously exiting for no good reason after running for a while. I eventually figured it out by running it under
gdb and telling
gdb to tell me about any signals received (You'll have to look up the details in "man
gdb"...) and that (eventually) told me where in the program it was receiving a bogus signal (In this case, SIGPIPE). I eventually fixed this by just ignoring SIGPIPE - since it wasn't my program, I didn't want to expend the effort to actually debug it.
Anyway, that's my suggestion to you - try running it under
gdb and you should be able to figure out where it is SIGSEGV'ing.
And some folks need to stop being fanboys and see the forest behind the trees.
(One of the best lines I've seen on this board lately)