Questions tagged [segfault]

The tag has no usage guidance.

12 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
2answers
673 views

Do YOU know how to find a seg fault?? Advice to new programmers

I have noticed a rash of questions lately that are essentially this: "My code has a segmentation fault. The code compiles, many tests pass, but I can't figure out the problem!" If this is ...
1
vote
2answers
70 views

Segmentation fault with overwriting chars

I tried overwriting cipupperalphabet[j] from a A to a B, but it has caused a segmentation fault. string upperalphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string cipupperalphabet = upperalphabet; int j = ...
0
votes
0answers
39 views

Pset4 Recover segmentation error

Help needed with recover part of pset4. Please find my code below. It compiles but produces a seg fault. Any comments are welcome. Thanks in advance. #include <stdio.h> #include <stdlib.h&...
0
votes
1answer
152 views

CS50 pset5 unload trie segmentation fault

I am having problems with implementing unload. load works perfectly and I can use the check function. I have tried many ways of changing my code but it only creates an infinite loop and I have no idea ...
0
votes
1answer
102 views

Segmentation fault..Please Help

can anyone have a look at my code, find the problem and suggest improvements. im getting segmentation fault after calling 'check' function. typedef struct trie { bool word; struct trie* link[27];...
0
votes
0answers
29 views

I am blind. Can't find my error :(

I am trying to setup a server that can save some messages sent from a client. I took apart some code given in an example i found here. This is where I am now. Ive tried to change some stuff here ...
0
votes
1answer
80 views

Help with seg fault in pset5 speller

My speller seg faults at the space following the first word in whatever input text I use. Here is the gdb output for austinpowers.txt with the segfault just after reading the word AUSTIN: 107 ...
0
votes
2answers
158 views

Segfault in pset5 in load

My implementation of load uses a trie and when I attempt to access the bool is_word I get a segfault. Can you guys help me out? Any suggestions on how to improve my code would be amazing. Thanks ...
0
votes
1answer
110 views

pset4 recover.c sge fault cant find first jpg signature

Here is my code. I keep getting a segmentation fault while iterating over beginning of bufferArray[512] looking for the first jpg signature. Please help! I cant see what i've done wrong. Im trying to ...
0
votes
1answer
464 views

pset4 recover segfault: no such file/directory

My code seems to have trouble making the .jpg files in which to place the blocks of data. #include <stdio.h> #include <stdlib.h> #include <stdint.h> uint8_t buffer[512]; uint8_t ...
0
votes
1answer
81 views

segfaults and delayed printf commands while using GWindow in loop

printf("%c.\n", (getText(precrmo_menu[3]))[0]); char input[3]; input[0] = (getText(precrmo_menu[3]))[0]; printf("we lived"); if (strcmp(input, "") != 0 && !isblank(input) && ...
0
votes
1answer
227 views

Segfault Pset6 Check()

I receive a segfault at this line of code if (pathCheck -> children[charVal] == NULL) { return false; } pseudocode buildup: initialise pathCheck to NULL while character is ...