program crashes at start

Discussion in 'C++' started by wongjoekmeu@yahoo.com, Apr 13, 2006.

  1. Guest

    Hiya all,
    I have a strange problem. I have compiled a program with g++ compiler.
    It seems to compile fine. I can even compile it with debug (-g) option.
    However at the very beginning when I run the program I get a
    segmentation fault. "Program receive SIGSEGV signal." is what I see
    when I use a debugger. I have even put a print state right in the
    beginning of the main() function. It seems that the program does not
    reach this state at all. Since the crash does not deliver any more
    information, I am stuck. Can anyone help me please with solving this
    problem by giving me some direction ?
    Many thanks in advance.
    RWJM
    , Apr 13, 2006
    #1
    1. Advertising

  2. benben Guest

    wrote:
    > Hiya all,
    > I have a strange problem. I have compiled a program with g++ compiler.
    > It seems to compile fine. I can even compile it with debug (-g) option.
    > However at the very beginning when I run the program I get a
    > segmentation fault. "Program receive SIGSEGV signal." is what I see
    > when I use a debugger. I have even put a print state right in the
    > beginning of the main() function. It seems that the program does not
    > reach this state at all. Since the crash does not deliver any more
    > information, I am stuck. Can anyone help me please with solving this
    > problem by giving me some direction ?
    > Many thanks in advance.
    > RWJM
    >


    Since the OP doesn't supply any code for diagnostics I am assuming that
    he has at least one static object of a type which has a constructor that
    accesses invalid memory.

    Regards,
    Ben
    benben, Apr 13, 2006
    #2
    1. Advertising

  3. wrote:
    > Hiya all,
    > I have a strange problem. I have compiled a program with g++ compiler.
    > It seems to compile fine. I can even compile it with debug (-g) option.
    > However at the very beginning when I run the program I get a
    > segmentation fault. "Program receive SIGSEGV signal." is what I see
    > when I use a debugger. I have even put a print state right in the
    > beginning of the main() function. It seems that the program does not
    > reach this state at all. Since the crash does not deliver any more
    > information, I am stuck. Can anyone help me please with solving this
    > problem by giving me some direction ?
    > Many thanks in advance.
    > RWJM


    My crystal ball tells me the following FAQ may be your problem:

    http://www.parashift.com/c -faq-lite/ctors.html#faq-10.12

    If that's not it, you're going to have to post a short _compilable_
    example that illustrates the problem.

    Best regards,

    Tom
    Thomas Tutone, Apr 13, 2006
    #3
  4. Noah Roberts Guest

    wrote:
    > Hiya all,
    > I have a strange problem. I have compiled a program with g++ compiler.
    > It seems to compile fine. I can even compile it with debug (-g) option.
    > However at the very beginning when I run the program I get a
    > segmentation fault. "Program receive SIGSEGV signal." is what I see
    > when I use a debugger. I have even put a print state right in the
    > beginning of the main() function. It seems that the program does not
    > reach this state at all. Since the crash does not deliver any more
    > information, I am stuck. Can anyone help me please with solving this
    > problem by giving me some direction ?
    > Many thanks in advance.
    > RWJM


    Run a backtrace.
    Noah Roberts, Apr 13, 2006
    #4
    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. Andrew Clancy

    VS.Net install crashes on start

    Andrew Clancy, Feb 1, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    331
    Ken Cox [Microsoft MVP]
    Feb 1, 2005
  2. klops
    Replies:
    0
    Views:
    355
    klops
    May 14, 2004
  3. ahmad
    Replies:
    1
    Views:
    1,903
    Gernot Frisch
    Jan 12, 2005
  4. Replies:
    3
    Views:
    416
    Chad Netzer
    Aug 21, 2003
  5. Gary Richardson

    Bug 834351 - Mouse wheel crashes program

    Gary Richardson, Dec 8, 2004, in forum: Python
    Replies:
    2
    Views:
    274
    Adonis
    Dec 10, 2004
Loading...

Share This Page