As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [speller]

speller.c is one of the files that make up Problem Set 5, but it is already written by CS50 Staff and you may not alter it! Instead, you must implement your solution by altering three other component files: dictionary.c, dictionary.h, and Makefile.

Filter by
Sorted by
Tagged with
0 votes
1 answer
14 views

Pset 5: Speller - Double free or corruption (fasttop) error

Having to post a new question as the I reworked my code and space restrictions won't allow me to post it in the original thread. I changed my code based on @CliffB 's suggestion. However, now I am ...
Soumik's user avatar
  • 15
0 votes
1 answer
5 views

PSet5 Speller: What is each function in dictionary.c supposed to do?

I've started working on this PSet, and now I'm confused because in the instructions I can't figure out where it tells me what each function is supposed to do. Hash is never even called in speller.c so ...
They think im slow EH's user avatar
0 votes
1 answer
23 views

Everything is correct in my Check50 but in program I have other ERRORS - PSET05 Speller

I hope you're doing well and I also hope you might help me. When I run my CHECK50 in my speller program. Everything is correct all green, but when I run my program or valgrind I have some errors. And ...
AlvaroAndLukeTheCoder's user avatar
0 votes
0 answers
13 views

What's wrong in my Speller.c? dictionary.c Errors Help! [duplicate]

I've been doing the dictionary.c file and I've completed all the required functions. When I run ./speller texts/lalaland.txt, it prompts some misspelled words that are not in keys/lalaland.txt file, ...
AlvaroAndLukeTheCoder's user avatar
0 votes
1 answer
17 views

Pset5 Speller - trying to understand more about segmentation fault

I tested a piece of code to figure out what's causing the segmentation fault with the 'load' function. The code below opens the large dictionary. Then it scans and prints each string inside the ...
Soumik's user avatar
  • 15
0 votes
1 answer
30 views

PSET5 Speller - Problem with Check Function

There seems to be a problem with my check function that I cannot get to the bottom of. It's showing correctly spelled words as misspelled. For instance, the final check of check50 fails because my ...
Gilbert's user avatar
0 votes
1 answer
27 views

Pset5 speller segmentation fault when loading

When I run speller, I get a segmentation fault. I have played around with the code a little bit and nothing so far has changed. Using help50, this is the result I got: Looks like you're trying to ...
Team's user avatar
  • 5
0 votes
0 answers
36 views

How can I fix this double free in speller?

I've posted this question previously but I tried to post various functions from my code without posting the whole code at once, because I thought that was better etiquette or something. However, the ...
Mark Dittmer's user avatar
0 votes
0 answers
30 views

Speller: Valgrind tests fail; problem may be with load

My spell checker seems to run pretty well, except the unload function never ran properly. It compiles, but executing it prints out the misspellings but then prints the message, "double free ...
Mark Dittmer's user avatar
0 votes
1 answer
32 views

pset5 speller valgrind test fails

in check50 my code fails last test (valgrind test) fails it says: "Use of uninitialised value of size 8: (file: dictionary.c, line: 41)" i starred line 41 below, I tried both using if(!...
emre kırmızı's user avatar
0 votes
1 answer
22 views

PSET5 Speller case conversions

I've been struggling with writing code for case conversions in the check function to make all hash words to be lower-cased. My lack of knowledge in programming overall seems to be revealed at this ...
Jae-Min's user avatar
0 votes
0 answers
28 views

(pset5)I get a segmentation foult, even though check50 says that everything is allright

as per the title — I get a segfoult and can't check my times, even though check50 claims that the code is practically ready to submit. Here's my code, followed by valgrind results: // Implements a ...
Two-FaceFIL's user avatar
0 votes
1 answer
30 views

PSET 5 Speller Issues with Check

for Speller in Pset 5, I am having issues with my check function, not sure how to deal with words with apostrophe and need some tips if possible. The issue should be with the check function of my ...
duckpro's user avatar
0 votes
1 answer
32 views

Pset 5 Speller fscanf returning 0

for Pset5 speller my code for load along with the generation of hash codes leads to a segmentation fault. I realized it is because fscanf returns 0 after the last word of the dictionary, leading to -...
duckpro's user avatar
0 votes
1 answer
74 views

Pset5 Speller - Valgrind issue

this one was tough. But in the end my code compiles fine and has no memory leaks, the hash function isn't very good but it works. Yet I still get an error message that I just don't understand. First, ...
fth's user avatar
  • 3
0 votes
1 answer
32 views

Pset5 speller memory error --valgrind says no leaks

I almost finished pset 5 speller, I ran check50 and only the last criteria was not matched. That is "valgrind tests failed; see log for more information." The confusing thing is, when I ran ...
Eva Chen's user avatar
0 votes
1 answer
21 views

PSET5 Speller seg fault

I keep having segmentation fault in Pset5 Speller. I used debugger to find the line where seg fault happens, and it was "table[k] = n;" in function load. I don't really understand. Could ...
Eva Chen's user avatar
0 votes
1 answer
38 views

Getting segmentation fault when running speller.c

I am trying to solve speller and I always get segmentation fault every time I run it. I checked the error on valgrind and it told me that the culprit is in line 108, where I allocate a new node. How ...
IgorArnaut's user avatar
0 votes
0 answers
37 views

I'm working on pset5 - speller, it works fine when I run/test it, but when I run 'check50' it show this error. help me with this

[EDIT: Code removed for Harvard Honor Code compliance.]
Santhosh's user avatar
0 votes
2 answers
97 views

Valgrind error in pset5 speller

newbie here this is my first post, I hope you guys can help me! I am stacked with speller, my program works apparently fine but the valgrind test outputs some errors that I can't understand. I have ...
turo's user avatar
  • 3
0 votes
1 answer
38 views

pset5 speller load and hash functions

Whenever I run speller.c it appears that none of the words are getting loaded into the dictionary as the output looks like this: MISSPELLED WORDS A cat is not a caterpillar WORDS MISSPELLED: 6 ...
Sharl's user avatar
  • 3
0 votes
1 answer
115 views

Speller fclose() generates free(): invalid size error

// adding global bool value to return true if dictionary loaded and false otherwise bool loaded; // adding global int value to count amount of words loaded into dictionary int word_count = 0; // ...
Sneili's user avatar
  • 1
0 votes
2 answers
55 views

PSET 5 Speller Check50 Problem

I think I have done everything you're supposed to do in PSET5 Speller. when I manually check the outputs of my code, it works perfectly well. It matches the staff solutions one to one. Yet Check50 ...
dohaal's user avatar
  • 1
0 votes
1 answer
29 views

PSET 5 Speller Valgrind Memory

My code is functional according to check50 but I'm still leaking bad memory. Based on amount of memory lost, I'm guessing something to close up in LOAD, but could be UNLOAD as well. First thoughts are ...
mcweebus's user avatar
0 votes
1 answer
51 views

PSET5 - Speller - Valgrind returns memory leak

After many trials, I am currently stuck in this Pset. The full code that I have is as follows: // Implements a dictionary's functionality #include <ctype.h> #include <stdbool.h> #include &...
Dr. Whiskers's user avatar
0 votes
1 answer
32 views

Pset5 Speller - Got "Conditional jump or move depends on uninitialised value(s)", "Use of uninitialised value of size 8" by check50

I try my code here to solve the pset5 - speller question, it seems pretty ok with locally run my valgrind. But when I use check50 to check it. One error(and only 1) happened. I tried to assigned ...
Li-Yu Chu's user avatar
0 votes
1 answer
34 views

Pset5 Speller Issue With Substrings and Apostrophes

I'm able to compile my code for speller and it appears to work correctly. Valgrind shows that there are no memory errors. But when I run check50, I get back :( notices saying my code isn't handling ...
getsendy's user avatar
1 vote
1 answer
3k views

PSet 5 - malloc(): corrupted top size (please help)

Im having a problem at the load function wich is returning me the following message on the terminal: malloc(): corrupted top size Aborted (core dumped) Screenshot of what terminal returns to me. ...
BrazilianEnthusiast's user avatar
0 votes
1 answer
25 views

CS50 PSET 5: Returning 0 words in large dictionaries only

I've been trying to figure this out for a while now. I'm doing PSET 5 and all my dictionary words in large texts return 0, though when I've tried the small dictionary, it returns the words fine there. ...
figuringitout101's user avatar
0 votes
1 answer
29 views

How Can I Fix My Speller?

So, I have been working on Speller for at this point 40 - 50 hours at this point. However, I have not made much progress. No matter what I try to change, or try to rewrite, I always seem to run into ...
Yash-902's user avatar
0 votes
1 answer
85 views

Pset5 speller memory leak (valgrind: definitely lost)

There is a memory leak problem with my code when I ran it with valgrind.I have already check my code and passed all of them except for memory test.I am hoping someone can help me solve this problem....
mad_oreo's user avatar
0 votes
1 answer
38 views

segmentation fault from pointers

i keep getting segmentation fault when running this code. using printf i can see its from loading ala and the hashtable to store this is set to nil. other words when the hashtable to store them is nil ...
yosef's user avatar
  • 5
0 votes
1 answer
101 views

Speller works for everything but one letter words

When I run my speller program it works on everything but one letter words. I have been trying to figure this problem for a long time. I think it is a problem with either my hash or check functions. ...
Ajy_Chikn's user avatar
0 votes
0 answers
95 views

Pset5 Speller Memory Problem

I am having a memory issue with my program in speller. Check50 returns all green except for the last line which says :( program is free of memory errors expected "MISSPELLED WOR...", not &...
sage7major16's user avatar
0 votes
1 answer
41 views

segmentation fault with node pointers on speller

I know which line has the segmentation fault , if (table[hashn]->next == NULL) In this case hashn is 0 so its not exceeding the array Any ideas why its happening?
Leo8479500282664829200's user avatar
0 votes
1 answer
70 views

PSET5: Problem with my check function, but I'm not sure

I have been stuck with this problem for many hours now, but I still can't wrap the idea around my head. When I test run this code, it just prints out "MISSPELLED WORDS", and nothing more. ...
amadeus445's user avatar
0 votes
1 answer
49 views

PSET5 - SPELLER - Check50 only works locally

I am trying to run check50 on my version of speller. I worked for so long on this code. It was a battle every step of the way to get it to finally run. I finally seemingly got it today. My code works ...
ruscias's user avatar
0 votes
1 answer
19 views

pset5 speller different unload algorithms

I just finished pset5 but I had a question about why a (what i think is) recursive method doesnt work but the one i went with does. if you skip and look in unload youll see a "destroy" ...
JuneDev's user avatar
0 votes
2 answers
56 views

PS5 speller memory trouble

I have a strange problem with the below code for PS5 speller. I have can match the requested output, it is fast enough, that is all good. However I am having a persistent valgrind issue where I am ...
GmasterAU's user avatar
0 votes
1 answer
1k views

Speller Error - free(): double free detected in tcache 2 Aborted (core dumped)

// Implements a dictionary's functionality #include <ctype.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <strings.h> #include <string.h> ...
incog 's user avatar
0 votes
0 answers
16 views

my check and size functions are having problems and check50 returns all frowns

// Implements a dictionary's functionality #include <ctype.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #...
da4nk playz's user avatar
0 votes
4 answers
264 views

PSET5 Speller: Check50 Can't Compile: Exit code 2 vs 0

At my wit's end here. I've seen this question asked before, but I haven't really found an answer. My speller program compiles perfectly fine in the VS Code workspace. It generates the same results as ...
Steedy Speve's user avatar
0 votes
1 answer
29 views

Speller pset 5 my code is not working for substrings

I'm not sure why this is happening especially because it doesn't happen for cat #include <ctype.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <...
Bing Bong's user avatar
0 votes
1 answer
1k views

CS50 Pset5 Help

it's my first time on here after a long time of following conversations and seeking help. In Pset5 Speller (CS50 2022), I have a weird situation. My code for dictionary.c works when I use the basic ...
matsterdam's user avatar
0 votes
1 answer
49 views

Speller - Doesn't work properly

I can't seem to fix this code by myself. I'm sure the main issue is in the load function, but I've changed it many times and the best I could get is a few misspelled words. I haven't even changed the ...
Avanoc's user avatar
  • 3
0 votes
2 answers
175 views

speller seg fault

I have been on this for literal days, there is always a seg fault no matter what i do things i have tried: debug 50: MULTIPLE TIMES, i fix the errors i find but end up with another one soon after, ...
jeddah's user avatar
  • 5
0 votes
1 answer
54 views

PSet5 - Dictionary loading only one word

I've been banging my head for the last few hours as to why my dictionary function only saves one word from the whole dictionary. Even though debug50 and printf shows different hashes for different ...
javabeginner258's user avatar
0 votes
1 answer
54 views

Speller - My code keeps failing and I have no idea why

Running my dictionary.c code against the sample text with ./speller texts/lalaland.txt shows that I have the same number of misspelled words as the staff's solution, but for some reason I only have 1 ...
Jason Chu's user avatar
  • 103
0 votes
1 answer
57 views

PSET 5 Speller - can't make load function work

I can't pass load stage and I can't check other functions as I can't seem to load the words to the hash table. I tried to see where is the issue and found out fscanf function(?) doesn't seem like ...
armn's user avatar
  • 3
0 votes
1 answer
125 views

CS50 pset5 Speller: double free or corruption (fasttop) Aborted/ free(): double free detected in tcache 2

I get "double free or corruption (fasttop)\n Aborted" when I run my code. Somehow, only small dictionary can handle up to around 50 words perfectly but sometimes it can only handle 10 words; ...
mossburger55's user avatar

1
2 3 4 5
18