473,809 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

program crashes at start

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
3 1599
wo*********@yah oo.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

wo*********@yah oo.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

wo*********@yah oo.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4949
by: John Grogan | last post by:
I am experiencing problems with one Visual Basic project. It is prone to crashing - in the VB IDE and also when running a fully compiled executable. When it crashes in the IDE, then VB terminates too with no error message. When the standalone EXE crashes there are no error messages either. The project is reasonably big - 60 forms, 20 modules, 7 class modules, and it references a couple of custom DLLs too. I've tried running Dr Watson...
3
7039
by: srijit | last post by:
Hello, Any idea - why the following code crashes on my Win 98 machine with Python 2.3? Everytime I run this code, I have to reboot my machine. I also have Win32all-157 installed. from Tkinter import * class App:
5
11095
by: Simon Johnson | last post by:
Recently, a thread appeared which asked how to create a "catch all" method for when an exception occurs within a program. The solution given only works for Windows Forms applications, as far as i can tell, is it possible to do the same with a console application? Simon.
17
6457
by: UJ | last post by:
Is there any way for a windows service to start a windows program ? I have a service that will need to restart a windows app if it needs to. TIA - Jeff.
41
2482
by: z | last post by:
I use Visual C 2005 to develop my programs. One in particular is crashing in very specific and hard to replicate situations, made worse by the fact it only crashes when run -outside- the dev - as an exe, not from the Debug option. If I try to launch the debug on the crashing program, it'll close before the debugger opens. Any suggestions as to how I should proceed? Thanks in advance.
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10387
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.