Questions tagged [fault]

A fault is the immediate cause of a failure. It might be e.g. an incorrect statement in a method. The execution of the faulty method might result in a failure at execution time.

A fault is distinct from a failure and an error.

A fault is the immediate cause of a failure. It might be e.g. an incorrect statement in a method. The execution of the faulty method might result in a failure of a program at execution time.

A definition can be found in IEEE Standard 610.12-1990 IEEE Standard Glossary of Software Engineering Terminology

492 questions
-3
votes
3 answers

Something went wrong with my code

I was trying something, but the Programm will crash with this Error: Segmentation fault: 11 Has somebody a solution? char str1[20] printf("Enter Data: "); scanf("%s", &str1); printf("Entered Data: %s\n", str1); int ex = strtod(str1,…
Dominic Järmann
  • 361
  • 1
  • 7
  • 18
-3
votes
2 answers

Why am I always getting Segmentation faults when displaying my array in C?

I've tried so much code trying to display my data in a histogram. I've been stuck on this problem for two days now, data crawling the internet and such to find an answer but they usually talk about pointers and ect. while this is much more basic.…
user275564
  • 163
  • 1
  • 2
  • 10
-3
votes
2 answers

Why am I getting a segmentation fault? C programming

Here's my code that I'm getting a seg fault at. I'm pretty sure it has to do with the pass-by-reference, but it confuses me and I'm not sure if I'm doing it right. #include #include #include #include "utils.h" #define…
Christian
  • 1
  • 1
-4
votes
1 answer

Working with char pointer -> Segmentation fault

Im a beginner and at school we have task to split a char array by using pointer. I want to split the name and the birthday (delimiter = '.'). My solution works perfect for the name but doing it for the birthday i get a segmentation fault. int…
skillstar
  • 1
  • 4
-4
votes
1 answer

Error in terms.formula(formula, data = data)

I'm attempting to use the CausalImpact package in R. When I call the function I get an: "Error in terms.formula(formula, data = data) : invalid term in model formula" Which is too generic to be able to resolve. Anyone got any tips for trying…
-4
votes
3 answers

How to correct segmentation fault with char * to int conversion

ive written the following as a program in order to convert a pointer with a sequence of integers as its adress into an integer number: #include #include char *recepcao() { char *receber; scanf("%s", receber); return…
-4
votes
1 answer

segmentation fault(core dumped) in C in ubuntu

This is main.c This is print.c #include int wc(FILE *pointer) { int a; int character=0,word=0,line=0; a = getc(pointer); while ( a != EOF ) { character++; if (a == ' ') word++; if (a == '\n') line++; …
Huitseize
  • 1
  • 3
-4
votes
2 answers

C++ std::list segmentation fault

I got a segmentation fault (core dumped) while runing my programm. The first version runs perfectly but i need the list as a pointer but then the code doesn't work anymore see second code. What am i doing wrong? Runing version: int main(int argc,…
BeiHerta
  • 73
  • 9
-4
votes
3 answers

Simple Segmentation Fault Proglem

PNG * original; original->readFromFile("in.png"); int width = original->width(); int height = original->height(); I'm getting a segmentation fault in this bit of code. What am I doing wrong?
user5302162
-4
votes
2 answers

Segmentaion fault calling method the second time C++

If I add a second call to setColor I am getting a segmentation fault. I think maybe that method is changing the array pointer somehow, but I'm not sure why. #include using namespace std; struct Color { int red; int blue; int…
1 2 3
32
33