Questions tagged [unload]

The tag has no usage guidance.

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

Unload function pset5

I've completed the pset5 and got all the check50 marks correct, except the valgrind one. What is weird is that Valgrind also say that i've freed everything correctly. Here is the error message that I ...
1
vote
1answer
24 views

Speller - unload is giving me 1000000 errors in valgrind

so I don't know what I should do with my unload function to make it work properly? Because valgrind isn't happy at all and it's giving 1000000 errors (literally). The load function works perfectly (I ...
0
votes
0answers
18 views

PSET5: Memory Leak in unload

I am done with the code but valgrind tells my I still leak memory in my unload-function. I already checked if the code is working, and it does. With help50 I get the information that I leak 56B bytes ...
0
votes
3answers
51 views

PSet 5 Speller: How can the program tell if the dictionary has been successfully freed?

I'm pretty sure I'm just being dumb, but I've been wracking my brain and I'm drawing a blank. I've completed 5/6 of the functions in Speller, but the unload function has me stumped- the description ...
0
votes
1answer
23 views

Pset5 - Speller - Seg fault

I'm getting a segmentation fault when running this. Valgrind reports no errors, but a leak of 1,080 bytes at two blocks, with 5 allocs and only 3 free'd. Below is my load function and below that are ...
0
votes
1answer
50 views

PSET5/Speller - Valgrind error: conditional jump, relates to table[i] array, but I've already initialized that (or have I?)?

I posted something similar a couple of days ago but have made progress since then. Specifically I found a couple of posts answered by Cliff B indicating the problem users had was that they hadn't ...
0
votes
2answers
35 views

In PSET5/ Speller - Unload Valgrind says Conditional jump or move depends on uninitialised value(s)

So my code passes all the Check50 tests apart from the memory one. I have been playing around with this for ages, but don't understand what the problem is. Here's what valgrind says. And here's the ...
0
votes
1answer
29 views

Trying to fix a segfault in unload , pset5, speller

So when I originally wrote my code for the dictionary.c, I forgot to create the header nodes for each 'bucket' in the hash table. It ran well when every first node of each linked list had a letter, ...
1
vote
1answer
40 views

speller - unload returns false …?

unload returns false and i am not sure why.... when i run Valgrind i get this: HEAP SUMMARY: ==7885== in use at exit: 608 bytes in 2 blocks ==7885== total heap usage: 143,096 allocs, 143,094 ...
0
votes
1answer
38 views

recursive function on speller causing a “conditional jump” error on valgrind?

I am trying to implement a recursive subfunction for speller. It works, but when I run check50, I'm told that there is a "Conditional jump or move depends on uninitialised value(s): (file: ...
0
votes
1answer
142 views

Pset5 - Speller - memory leak?

My programme runs and I'm passing all the checks bar the last one. When I run the check with --log I get this response: :( program is free of memory errors valgrind tests failed; rerun with --log ...
0
votes
1answer
114 views

PSET 5 Speller - Unload leaking a ton of memory

I've been trying to read other questions on stack exchange about it and do research on it but I really couldn't find a solution for my unload problem. It doesn't seem to unload much. I tried a lot of ...
0
votes
1answer
177 views

PSET 5 Speller Failing free memory of errors final check

So i am so close to finally completing this present and i still have some final errors to go through. Valgrind is saying that it is still leaking memory for some reason and i cant find the reason why. ...
0
votes
1answer
57 views

PSET 5 Unload Segmentation Fault

I've been stuck on this problem set for a while now. Valgrind is telling me I have a problem in my unload function, which is "Conditional jump or move depends on uninitialised value(s)". I can't find ...
0
votes
1answer
103 views

CS50 Pset5 error: conditional jump or move depends on uninitialised value(s)

valgrind is showing me an error that I have trouble understanding. The error is "conditional jump or move depends on uninitialised value(s)". Valgrind is directing me to line 125 of my code, which is ...
0
votes
2answers
38 views

PSET5 - Valgrind error - no enough bytes are being freed

I've been on this pset for some time now and everythin seems to be working except that there are some memory leaks and I really can't understand why. I've checked a lot of other people's codes but I ...
0
votes
2answers
108 views

Pset5 Memory leak in unload()

I've been working on speller for about two weeks now and I've finally got the programm to work, but valgrind cam up with a few memory errors. I've managed to solve most of them on my own, but the leak ...
0
votes
1answer
143 views

Pset 5 Speller valgrind error

I am trying to fix the last error in my code pointed out by check 50. I think the problem is in my unload but can't say for sure. Here's my code. I know I have some basic functionalities wrong but ...
0
votes
1answer
25 views

PSET5 Unload() recursive sub-function causes 112 bytes to leak - why?

I've already fixed this issue playing around with my code, but I cannot seem to understand why this (former) version of my recursive function leaks 112 bytes (2 nodes). Can anyone please help me ...
3
votes
1answer
932 views

Help with PSet 5 2020 - Speller - Check & Unload Functions (EDIT: logic error in Load Function)

EDIT: Fixed the problem. The issue was not with the check or unload function but with the load function which had a small but very significant logic error. Figured it out with some great help from a ...
0
votes
0answers
41 views

PSET 5 - Valgrind - Invalid read of 8 - Unload

So close to submission! - However, when I check using valgrind the ouptut is: ==22743== Invalid read of size 8 ==22743== at 0x40135C: unload (dictionary.c:123) ==22743== by 0x400E59: main (...
0
votes
1answer
40 views

Speller seg faults in unload function

I've tried to fiddle around with my unload function for a while and don't understand why I'm getting a seg fault. It seems that the unload function is running through completely at least once, but ...
0
votes
1answer
358 views

pset5 speller unload function

I tried two methods but still, have a memory leak and also I didn't know how I know every step succeed or not. it supposes return true if free all memory and return false is not where I must write ...
0
votes
1answer
43 views

And one more “Invalid read of size” problem

So I've managed to write a program, which compiles, cleared all the segmentation fauls, made it to do all the required tasks correctly, like creating a hash table, cheacking for the misspelled words ...
0
votes
1answer
62 views

Stuck with Unload using trie

I could not unload the dictionary, and still don't understand why. It seems that it is not freeing what I think. I would really appreciate some help, here is my code: // Unloads dictionary from ...
0
votes
1answer
24 views

dictionary.c trie: setting variable to NULL doesn't set element to NULL

Working on the unload function in speller (dictionary.c)... My current test dictionary simply contains a letter c, as I'm just trying to make sure one iteration will work. So I should (and do, ...
0
votes
1answer
200 views

valgrind in speller unload says I am using a variable without a value, when I assign it in the previous line

I just finished my pset5 and when I try to run valgrind with help50, it appears that Looks like you're trying to use a variable that might not have a value? Take a closer look at line 115 of ...
0
votes
1answer
125 views

PSET4 unload() don't work

I'm not sure if my unload() function worked properly. I tried to use Valgrind and it said memory leaked 8mb. I tried check50 and it said I have a memory leak. Also, the time takes very long, it ...
0
votes
1answer
217 views

Unload works on small dictionary, but not on large? (speller.c / hash table method)

When testing with the small dictionary, it unloads as expected however when testing with the large dictionary, I receive the error "Could not unload dictionaries/large." The only difference that I've ...
0
votes
1answer
609 views

Pset5 Speller (using hash table) unload multiple errors

I have successfully implemented pset5 speller using a hash table, but am facing some residual issues with the unload() function. I am unable to resolve a number of errors that are identified by ...
0
votes
1answer
519 views

Pset4 - Speller - Unload broken?

I seem to have the load/size functions on point. I'm trying to implement unload before I move on to check, but my valgrind keeps telling me I have a ton of memory left (~8,011,460 bytes) and points ...
0
votes
1answer
447 views

Speller (pset 4 2019) - Can't fix memory leak in hashtable

I've been working on speller, and all my code does the job fine but I can't get rid of the memory leak valgrind is giving me. It seems to be something to do with my load function. I think it's my ...
0
votes
1answer
69 views

pset5 (trie) valgrind memory leak

I'm having trouble with the last step of pset5, valgrind. When I run it with the test text I get: Looks like you're trying to access 8 bytes of memory that isn't yours? Did you try to index into an ...
0
votes
2answers
145 views

PSet5 Unload(): *** Error in `./speller': double free or corruption (top): 0x0000000002bcb610 *** Aborted

I have been trying to solve this problem for about 3 weeks now...after multiple iterations I just cannot seem to find what I am doing wrong in the load or unload functions to trigger this error. Below ...
0
votes
1answer
53 views

PSet5: Segfault in unload

My code compiles, but when I run it it returns the following message and segfault. dictionary.c:183:9: runtime error: index 27 out of bounds for type 'struct node *[27]' dictionary.c:185:15: runtime ...
0
votes
1answer
119 views

Pset5 unload: how can I update Trie's data inside a recursive function?

few people suggested to use a recursive method of unloading a Trie data structure, but I am struggling with it a bit. I am stuck on the part on how can I update the root node ( the main node which ...
0
votes
1answer
79 views

Pset5 Memory leak with trie scructure

after almost 2 month of working I am finishing the pset5 but... I get memory leaks. valgrind plus help50 is giving me this: Looks like you're trying to access 8 bytes of memory that isn't yours? ...
0
votes
1answer
109 views

Problem in unload

I am having problem in my unload. While running valgrind it shows no leaks, but the program wont acquiesce check50. Here is the unload function: //free the memory bool freenode(node *first) { //...
0
votes
1answer
39 views

find the leak! pset5

I have run ./test which processes this function: bool unload(void) { //free up memory from linked list for (int i = 0; i < 26; i++) { if (hashtable[i] != NULL) { ...
0
votes
1answer
207 views

Pset5 trie unload -recursive function does not free memory

im close to finish this problem set , but i cannot figure out the working recursive function, especially if backtracking may work in this form of implementation: void rec_unload(node *trv) { for(...
0
votes
1answer
174 views

PSET5 Speller.c. Unload function returns segmentation fault

I am using a trie data structure for speller. I used a recursive function to unload the memory, so I could backtrack up the data structure after removing the last of the arrays of all null pointers . ...
0
votes
1answer
208 views

pset5 speller valgrind show leak in load function

my speller code works very well with all texts but when i ran valgrind there was heap leak in load() specifically in new_node malloc can you help me figure out why? there is my code for load() and ...
0
votes
1answer
108 views

pset5 2017 unload() trie segmentation fault and undefined behavior

Having a lot of trouble with unload(). I've scrapped nearly working functions several times just in the hopes that starting over will fix things. I cannot figure out why my code keeps leading to the ...
0
votes
1answer
76 views

pset5 speller unload - node allocation quirk

Most of this pset5 has gone smoothly, but unload() has caused me problems. When I'm navigating down my data structure (trie) to locate a node with all NULL children, the last index has a memory ...
0
votes
3answers
67 views

Segmentation error on PSET5 unload function

I'm working on the unload function for pset5 - speller and ran into segmentation errors with the first clear function below (dictionary.c unload function calls the recursive function clear). I ...
0
votes
1answer
73 views

pset5 trie leak on unload

The programme compiles fine but when i run help50 for leaks i get the following, though i have freed the children. i appreciate the help: ==11548== For counts of detected and suppressed errors, rerun ...
0
votes
0answers
45 views

can’t pass valgrind in pset5

I don’t know where is the error and when i use help50 that what i get and here is the code unsigned long hash(char* str); int count ; int table_size = 18788; typedef struct node { char word[...
0
votes
1answer
120 views

PSET5: Unloading function doesn't work

I've decided to implement the trie data structure and got everything working except the unloading part. I've written another function for it and it isn't working. I think it only frees the first few ...
0
votes
1answer
125 views

Pset5 Last frown to turn upside down!

I've been slogging away at speller for about 2 weeks now and im tripping over the last hurdle. heres what my check50 was spitting out https://cs50.me/checks/41dd8b60a432fa6adcd672274f3452ba6eedfda3 ...
0
votes
1answer
606 views

pset5 dictionary c. trie please help Unload()

i ve been working struggling so much... please, a hint why i can make it work. I don t know how to return the result and make sure that the conditions are followed. here are my codes for unload : ...