bus error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • xyz

    bus error

    I am getting a "bus Error" in my program.
    My simulation should run for 20 min..but i am getting bus error after
    10 min of my simulation....
    if this is the case please tell the reason for the bus error ...and
    how to resolve this ??


    thanks to all
  • =?UTF-8?B?RXJpayBXaWtzdHLDtm0=?=

    #2
    Re: bus error

    On 2008-07-28 10:05, xyz wrote:
    I am getting a "bus Error" in my program.
    My simulation should run for 20 min..but i am getting bus error after
    10 min of my simulation....
    if this is the case please tell the reason for the bus error ...and
    how to resolve this ??
    You have a bug in your code, might be a bad pointer. Use a debugger, or
    printf/cout to find the bug and then analyse and fix it.

    --
    Erik Wikström

    Comment

    • Nick Keighley

      #3
      Re: bus error

      On 28 Jul, 09:05, xyz <lavanyaredd... @gmail.comwrote :
      I am getting a "bus Error" in my program.
      My simulation should run for 20 min..but i am getting bus error after
      10 min of my simulation....
      if this is the case please tell the reason for the bus error ...and
      how to resolve this ??
      use a debugger on the core dump

      --
      Nick Keighley

      Comment

      • puzzlecracker

        #4
        Re: bus error

        On Jul 28, 7:57 am, Nick Keighley <nick_keighley_ nos...@hotmail. com>
        wrote:
        On 28 Jul, 09:05, xyz <lavanyaredd... @gmail.comwrote :
        >
        I am getting a "bus Error" in my program.
        My simulation should run for 20 min..but i am getting bus error after
        10 min of my simulation....
        if this is the case please tell the reason for the bus error ...and
        how to resolve this ??
        >
        use a debugger on the core dump
        >
        --
        Nick Keighley
        Are you sure that core dump would reveal the issue? It's not the
        segmentation fault, which is typically caused by a bad pointer or some
        undefined behavior in the code. Bus Error is typically caused by
        hardware, meaning that your code could be invoking a low level
        functionality.

        Reference: http://en.wikipedia.org/wiki/Bus_error

        Comment

        • red floyd

          #5
          Re: bus error

          On Jul 28, 1:05 am, xyz <lavanyaredd... @gmail.comwrote :
          I am getting a "bus Error" in my program.
          My simulation should run for 20 min..but i am getting bus error after
          10 min of my simulation....
          if this is the case please tell the reason for the bus error ...and
          how to resolve this ??

          You have an error on line 42 of your code.



          Comment

          • Ian Collins

            #6
            Re: bus error

            puzzlecracker wrote:
            On Jul 28, 7:57 am, Nick Keighley <nick_keighley_ nos...@hotmail. com>
            wrote:
            >On 28 Jul, 09:05, xyz <lavanyaredd... @gmail.comwrote :
            >>
            >>I am getting a "bus Error" in my program.
            >>My simulation should run for 20 min..but i am getting bus error after
            >>10 min of my simulation....
            >>if this is the case please tell the reason for the bus error ...and
            >>how to resolve this ??
            >use a debugger on the core dump
            >>
            *Please* don't quote signatures.
            >
            Are you sure that core dump would reveal the issue? It's not the
            segmentation fault, which is typically caused by a bad pointer or some
            undefined behavior in the code. Bus Error is typically caused by
            hardware, meaning that your code could be invoking a low level
            functionality.
            >
            Reference: http://en.wikipedia.org/wiki/Bus_error
            That depends on the machine. Some with generate a bus error for a
            misaligned memory access.

            --
            Ian Collins.

            Comment

            • Greg Comeau

              #7
              Re: bus error

              In article <22de2dc0-8a3e-4af1-bd0c-92f37e148b2d@27 g2000hsf.google groups.com>,
              puzzlecracker <ironsel2000@gm ail.comwrote:
              >On Jul 28, 7:57=A0am, Nick Keighley <nick_keighley_ nos...@hotmail. com>
              >wrote:
              >On 28 Jul, 09:05, xyz <lavanyaredd... @gmail.comwrote :
              I am getting a "bus Error" in my program.
              My simulation should run for 20 min..but i am getting bus error after
              10 min of my simulation....
              if this is the case please tell the reason for the bus error ...and
              how to resolve this ??
              >>
              >use a debugger on the core dump
              >
              >Are you sure that core dump would reveal the issue? It's not the
              >segmentation fault, which is typically caused by a bad pointer or some
              >undefined behavior in the code. Bus Error is typically caused by
              >hardware, meaning that your code could be invoking a low level
              >functionalit y.
              >
              >Reference: http://en.wikipedia.org/wiki/Bus_error
              If you are getting a "Bus Error" in your program,
              chances ARE GOOD that it is a bad pointer or some
              undefined behavior in the code, especially if it
              can be reproduced on demand. And of course, this is
              not meant to say that hardware problems can never be involved.
              Usually the software generated bus error is "detected" by the
              hardware, and it "reporting" it, which is obviously different than
              the hardware literally failing and causing the error (although
              there is a line in sand where it could be argued it really is
              a hardware problem even though the software "caused" it, but
              let's not go there).
              --
              Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
              Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
              World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
              Comeau C/C++ with Dinkumware's Libraries... Have you tried it?

              Comment

              • James Kanze

                #8
                Re: bus error

                On Jul 28, 2:35 pm, puzzlecracker <ironsel2...@gm ail.comwrote:
                On Jul 28, 7:57 am, Nick Keighley <nick_keighley_ nos...@hotmail. com>
                wrote:
                >
                On 28 Jul, 09:05, xyz <lavanyaredd... @gmail.comwrote :
                >
                I am getting a "bus Error" in my program.
                My simulation should run for 20 min..but i am getting bus error after
                10 min of my simulation....
                if this is the case please tell the reason for the bus error ...and
                how to resolve this ??
                >
                use a debugger on the core dump
                >
                --
                Nick Keighley
                >
                Are you sure that core dump would reveal the issue? It's not the
                segmentation fault, which is typically caused by a bad pointer or some
                undefined behavior in the code. Bus Error is typically caused by
                hardware, meaning that your code could be invoking a low level
                functionality.
                >
                Reference:http://en.wikipedia.org/wiki/Bus_error

                Comment

                • James Kanze

                  #9
                  Re: bus error

                  On Jul 28, 2:35 pm, puzzlecracker <ironsel2...@gm ail.comwrote:
                  On Jul 28, 7:57 am, Nick Keighley <nick_keighley_ nos...@hotmail. com>
                  wrote:
                  On 28 Jul, 09:05, xyz <lavanyaredd... @gmail.comwrote :
                  I am getting a "bus Error" in my program.
                  My simulation should run for 20 min..but i am getting bus error after
                  10 min of my simulation....
                  if this is the case please tell the reason for the bus error ...and
                  how to resolve this ??
                  use a debugger on the core dump
                  Are you sure that core dump would reveal the issue? It's not
                  the segmentation fault, which is typically caused by a bad
                  pointer or some undefined behavior in the code. Bus Error is
                  typically caused by hardware, meaning that your code could be
                  invoking a low level functionality.
                  Did you read the "reference" you're quoting. One of the most
                  common cases of a bus error is an unaligned access. (Despite
                  what the article says, on most machines today, trying to access
                  inexistant memory results in a segment violation, and not a bus
                  error.)

                  Whatever the reason for the core dump, however, the core file is
                  the same.

                  --
                  James Kanze (GABI Software) email:james.kan ze@gmail.com
                  Conseils en informatique orientée objet/
                  Beratung in objektorientier ter Datenverarbeitu ng
                  9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

                  Comment

                  Working...