Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > program crashes at start

Reply
Thread Tools

program crashes at start

 
 
wongjoekmeu@yahoo.com
Guest
Posts: n/a
 
      04-13-2006
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

 
Reply With Quote
 
 
 
 
benben
Guest
Posts: n/a
 
      04-13-2006
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
 
Reply With Quote
 
 
 
 
Thomas Tutone
Guest
Posts: n/a
 
      04-13-2006

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

 
Reply With Quote
 
Noah Roberts
Guest
Posts: n/a
 
      04-13-2006

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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
James Gosling the Creator of EMACS and JAVA - leaves ORACLE - Butthen reports started coming in of odd failures. Systems would crashstrangely. We'd get crashes in applications. All applications. Crashes in thekernel. small Pox C Programming 2 07-22-2010 10:07 PM
Program crashes because of file compost.exe Richard Wright Computer Support 3 04-11-2005 02:25 PM
VS.Net install crashes on start Andrew Clancy ASP .Net 1 02-01-2005 12:53 PM
delete []array problems (program crashes) ahmad C++ 1 01-12-2005 08:52 AM
sun application server 8 crashes after its start immediately klops Java 0 05-14-2004 12:59 PM



Advertisments