473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

random error

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
Jul 22 '05 #1
5 1331
Fozzy wrote:
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).
Jul 22 '05 #2
Fozzy wrote:
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??
Jul 22 '05 #3
Barney wrote:
Fozzy wrote:
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??


Yes, cheers
Jul 22 '05 #4
On Wed, 19 Jan 2005 16:04:08 +0000 in comp.lang.c++, Fozzy
<no********@nowhereland.org> wrote,
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?

Jul 22 '05 #5
David Harmon wrote:
On Wed, 19 Jan 2005 16:04:08 +0000 in comp.lang.c++, Fozzy
<no********@nowhereland.org> wrote,
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?


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

Cheers
Jul 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Acacia | last post by:
How would you generate a random number in C++?
4
by: Robert Scheer | last post by:
Hi. Reading about the Math.random method I saw that by default it generates between 0 and 1. To generate numbers between a greater range I can use these syntaxes: x = Math.random()/10 x =...
10
by: Virus | last post by:
Ok well what I am trying to do is have 1.) the background color to change randomly with 5 different colors.(change on page load) 2,) 10 different quotes randomly fadeing in and out in random...
16
by: Jason | last post by:
Hi, I need a way to use random numbers in c++. In my c++ project, when using the mingw compiler I used a mersenne twister that is publicly available and this did its job well. Now I have...
1
by: John C | last post by:
Hi, I am trying to include the generation of random numbers in my c++ class. However I don't quite know how to incorporate it. To start with, I managed to get random numbers going via the...
9
by: greeningster | last post by:
I have written an application in Visual C++ for a customer but it seems to crash randomly. Could anyone give me any help on how I could track this down ? Also, there appears there might be...
10
by: Marshall Belew | last post by:
I'm trying to synchronize a network app that uses random numbers generated by System.Random. Rather than pass every randomly generated number, I just pass the seed. I'm seeing a result that leads...
5
by: jar13861 | last post by:
I'm confused on how to write a random array that will only generate 9 different numbers from 1-9. Here is what I have, but its only writing one number.... holder = new Array ( 9 ); var flag =...
1
by: ssims | last post by:
I've got this code for a random GDI+ chart generator, and the demo works, but when I try to run it on my local machine I get a compiler error: Compiler Error Message: CS0117: 'Random' does not...
0
by: urkel | last post by:
Hello everybody, I have these errors on C program that may be because of random number definition. I use an SSH to compile C like in Linux. May be you have idea whether the errors are due to the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.