472,333 Members | 1,173 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,333 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 5931
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.