random error

F

Fozzy

Anyone know how to find the cause of an error where a C++ program gives
a SIG fault when creating something. The thing is any old random thing
that is created. I can't find any good reason... :(

Cheers for any help
 
V

Victor Bazarov

Fozzy said:
Anyone know how to find the cause of an error where a C++ program gives
a SIG fault when creating something.

What's "something" and what do you mean by "creating"? Opening a file?
Allocating a dynamic object?
The thing is any old random thing

What do you mean by "random"?
that is created. I can't find any good reason... :(

I can't claim understanding of your problem. I don't mean to be rude,
but perhaps you could try to be a bit more specific?

Have you tried running your process under a debugger? I would expect
most modern debuggers to be able to catch a segmentation fault (I am not
sure what a SIG fault is, though).
 
B

Barney

Fozzy said:
Anyone know how to find the cause of an error where a C++ program gives
a SIG fault when creating something. The thing is any old random thing
that is created. I can't find any good reason... :(

Cheers for any help

Have you tried remaking everything??
 
D

David Harmon

On Wed, 19 Jan 2005 16:04:08 +0000 in comp.lang.c++, Fozzy
Anyone know how to find the cause of an error where a C++ program gives
a SIG fault when creating something. The thing is any old random thing
that is created. I can't find any good reason... :(

That most commonly means that something earlier, perhaps much earlier
in the execution of the program, has gone wrong in such a way as to
damage the free memory pool structures. It could be the result of
anything defined as "undefined behavior". Most common thing in my
opinion is writing through an uninitialized pointer.
What is the code like?
 
F

Fozzy

David said:
On Wed, 19 Jan 2005 16:04:08 +0000 in comp.lang.c++, Fozzy



That most commonly means that something earlier, perhaps much earlier
in the execution of the program, has gone wrong in such a way as to
damage the free memory pool structures. It could be the result of
anything defined as "undefined behavior". Most common thing in my
opinion is writing through an uninitialized pointer.
What is the code like?

The code is gigantic with pointers flying about everywhere, which makes
finding any such error very difficult. Thanks for the advice anyway.

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,197
Messages
2,571,041
Members
47,643
Latest member
ashutoshjha_1101

Latest Threads

Top