Core Dump - Segmentation Fault -Newbie

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • johnericaturnbull@yahoo.com

    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?
  • Stefan Behnel

    #2
    Re: Core Dump - Segmentation Fault -Newbie

    johnericaturnbu ll@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

    Comment

    • johnericaturnbull@yahoo.com

      #3
      Re: Core Dump - Segmentation Fault -Newbie

      On Jul 18, 9:56 am, Stefan Behnel <stefan...@behn el.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)

      Comment

      • Doug Morse

        #4
        Re: Core Dump - Segmentation Fault -Newbie

        On Fri, 18 Jul 2008 15:56:10 +0200, Stefan Behnel <stefan_ml@behn el.dewrote:
        johnericaturnbu ll@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

        Comment

        • Stefan Behnel

          #5
          Re: Core Dump - Segmentation Fault -Newbie

          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

          Comment

          • Terry Reedy

            #6
            Re: Core Dump - Segmentation Fault -Newbie



            johnericaturnbu ll@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

            Comment

            Working...