Questions tagged [segfault]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
8 votes
2 answers
2k views

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

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 ...
Cliff B's user avatar
  • 68.4k
5 votes
1 answer
695 views

Is something wrong with getType(object)?

For pset4, in this code(in main, to check collision of ball and anything else): GObject object = detectCollision(window, ball); if (strcmp(getType(object), "GRect") == 0) { ...
Confused Guy's user avatar
1 vote
1 answer
232 views

pset5 load function segfault do not show in gdb

I cannot figure what's wrong with the code, it gives me a segfault, but runs in valgrind and in gdb. So far, i only wrote the load function, so anything else is still empty. #include <stdbool....
user10187's user avatar
1 vote
1 answer
638 views

pset5 speller.c with hashtable errors and seg fault

this is my code so far for pset5. I would appreciate giving me hints about my erros. I also get a segmentation fault. thanks. when I implemented load and check only, it seemed to load the text and ...
Riham Nour's user avatar
0 votes
1 answer
80 views

Pset 5: Segmentation fault in load function

I am not able to figure out what is causing the segmentation fault in my load function. Valgrind is pointing to fread and the lines where I have 'malloc'-ed memory, but more importantly to the line ...
Soumik's user avatar
  • 15
0 votes
1 answer
3k views

Speller Unload Trie with Recursion

node* root; bool unload(void) { freenodes(root); return true; } freenodes function(node* path) { loop over all nodes { if node is not null (path -> children[i]) ...
Adam Wilson's user avatar