By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,903 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

program crashes at start

P: n/a
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 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
wo*********@yahoo.com 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
Apr 13 '06 #2

P: n/a

wo*********@yahoo.com 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-lit...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

Apr 13 '06 #3

P: n/a

wo*********@yahoo.com 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.

Apr 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.