473,395 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Core Dump - Segmentation Fault -Newbie

Hi - I am very new to python. I get this random core dump and am
looking for a good way to catch the error. I know the function my core
dump occurs. Is there any error catching/handling that I could use in
python?
Jul 18 '08 #1
5 6058
jo***************@yahoo.com wrote:
Hi - I am very new to python. I get this random core dump and am
looking for a good way to catch the error. I know the function my core
dump occurs. Is there any error catching/handling that I could use in
python?
Since you are using Windows, this is somewhat non-trivial due to the lack of
tools shipped by Microsoft. Are you really getting crashes of the interpreter
and not just an exception with a stacktrace?

Stefan
Jul 18 '08 #2
On Jul 18, 9:56*am, Stefan Behnel <stefan...@behnel.dewrote:
johnericaturnb...@yahoo.com wrote:
Hi - I am very new to python. I get this random core dump and am
looking for a good way to catch the error. I know the function my core
dump occurs. Is there any error catching/handling that I could use in
python?

Since you are using Windows, this is somewhat non-trivial due to the lackof
tools shipped by Microsoft. Are you really getting crashes of the interpreter
and not just an exception with a stacktrace?

Stefan
Hi - thanks for responding. I am actually running on linux. Does this
make a difference? Also the error shown is:

myFunction call failed. Segmentation Fault (core dumped)
Jul 18 '08 #3
On Fri, 18 Jul 2008 15:56:10 +0200, Stefan Behnel <st*******@behnel.dewrote:
jo***************@yahoo.com wrote:
Hi - I am very new to python. I get this random core dump and am
looking for a good way to catch the error. I know the function my core
dump occurs. Is there any error catching/handling that I could use in
python?

Since you are using Windows, this is somewhat non-trivial due to the lack of
tools shipped by Microsoft. Are you really getting crashes of the interpreter
and not just an exception with a stacktrace?

Stefan
Hi John,

Well, I must be missing something re: why Stefan states that you are using
Windows. I don't see that stated in your original post, and, AFAIK, the
phrase "core dump" is seen much more in the Unix world than in the Windows
world.

So, just in case you are on some *nix variant, you can of course log all the
system calls up until your core dump by running:

$ strace -o logfile.txt python [...]

where [...] should be replaced with any parameters to the python interpreter,
such as the Python script you're running, e.g.,

$ strace -o logfile.txt python Hello.py

The trace of system calls will be in the file logfile.txt. For more info on
strace, see the strace(1) man page (i.e., run "man strace").

Doug

Jul 18 '08 #4
Doug Morse wrote:
Well, I must be missing something re: why Stefan states that you are using
Windows. I don't see that stated in your original post
It's stated in the mail headers of his post, though. That's the problem with
newbies - you never know where that stops being right.

Stefan
Jul 18 '08 #5


jo***************@yahoo.com wrote:
Hi - I am very new to python. I get this random core dump and am
looking for a good way to catch the error. I know the function my core
dump occurs. Is there any error catching/handling that I could use in
python?
When posting such questions, please supply Python version, system info,
and usually code.

If you wrote a function in Python that seg faulted, congratulations, its
hard (but not impossible) to do ;-). Post it.

If you (or someone else) wrote a C function that seg faulted while
calling the Python api, well that is much easier. Post it or bug the
author.

If you (or someone else) wrote a C function that seg faulted in normal C
code, well that's easy. Most likely a bad pointer.

tjr

Jul 18 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mike Orb | last post by:
Hi. I've successfully installed PHP in the past but am having problems compiling it all of a sudden. To try to fix the problem I downloaded a fresh copy of Apache 1.3.29 and PHP 4.3.5 and kept the...
2
by: Ng Pheng Siong | last post by:
Hi, I just noticed that demo/evp_ciph_test.py of my M2Crypto package causes a core dump. It used to not do that. ;-) The core dump happens when the program is exiting; in the output below,...
3
by: Nick Craig-Wood | last post by:
I've just discovered that my python (Python 2.3.4 from debian package 2.3.4-1 running on debian testing x86 + linux 2.4.26) core dumps when I set recursionlimit very high and do lots of recursion....
8
by: Jing Cheng | last post by:
Hi, I'm using ifstream reading data from a file, as following: ifstream finput("track.dat"); if(finput.fail()){ cerr << "Open input DATA file error!\n"; exit(-1);
10
by: ken | last post by:
hello, i'm writing a c program on a linux system. i'm debugging a segmentation fault but i don't want it to dump a core file because the memory footprint of the program is over 300Mb and i don't...
10
by: wong_powah | last post by:
I want to find out where (which line) my C program core dump. How to do that? Is there a web site describing the procedure? One approach is to use stack trace of the mdb debugger, but I does not...
14
by: Sheldon | last post by:
Hi, I have a python script that uses a C extention. I keep getting a recurring problem that causes a core dump a few lines after the C extention return data back tp python. I tried using pbd and...
1
by: avinash jain | last post by:
I got a segmentation fault.. I came to know that the problem could be easliy solved be the core dump files. could any tell how to create a core dump file and how to read a core dump file. I am...
2
by: Zach | last post by:
I compiled a game client and it crashed (segmentation fault) resulting in a core file being generated. I'm trying to find out exactly what caused it to crash. Any ideas how I can do this with gdb?...
4
by: Willy Wijaya | last post by:
I have wrote this code.. But when i try to compile it using gcc in PCLinuxOS 2007, i got this message "Help me about segmentation fault (core dump)" when I run the client script.. //CLIENT...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.