Core Dump - Segmentation Fault -Newbie

Discussion in 'Python' started by johnericaturnbull@yahoo.com, Jul 18, 2008.

  1. Guest

    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, 2008
    #1
    1. Advertising

  2. 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
    Stefan Behnel, Jul 18, 2008
    #2
    1. Advertising

  3. Guest

    On Jul 18, 9:56 am, Stefan Behnel <> wrote:
    > 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 - 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, 2008
    #3
  4. Doug Morse Guest

    On Fri, 18 Jul 2008 15:56:10 +0200, Stefan Behnel <> wrote:
    > 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
    Doug Morse, Jul 18, 2008
    #4
  5. 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
    Stefan Behnel, Jul 18, 2008
    #5
  6. Terry Reedy Guest

    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
    Terry Reedy, Jul 18, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. halfdog
    Replies:
    12
    Views:
    12,409
  2. Pieter Droogendijk

    segmentation fault (core dumped)

    Pieter Droogendijk, Dec 20, 2003, in forum: C Programming
    Replies:
    13
    Views:
    4,531
    no_name
    Jan 5, 2004
  3. Willy Wijaya

    Help me about segmentation fault (core dump)

    Willy Wijaya, Jan 19, 2008, in forum: C Programming
    Replies:
    4
    Views:
    646
    EventHelix.com
    Jan 24, 2008
  4. jaswinder
    Replies:
    15
    Views:
    3,986
    Barry Schwarz
    Aug 14, 2010
  5. LHradowy

    perl -d memory fault and core dump.

    LHradowy, Nov 20, 2006, in forum: Perl Misc
    Replies:
    0
    Views:
    141
    LHradowy
    Nov 20, 2006
Loading...

Share This Page