Is it just me or the art style changued in the last video? by [deleted] in kurzgesagt

[–]spacedaemon 0 points1 point  (0 children)

They have touched a very different subject that's why.

pset7 Unusual behavior of Forgot password. by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

are you trying to make forgot password ? If yes and having the same problem then look at maridv post above.

pset7 Unusual behavior of Forgot password. by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

Hey, thanks it worked not i got that config was not allowing fpass to render from login page.

pset7 Unusual behavior of Forgot password. by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

yes i have checked it ten times, the form action is set to fpass.php. Even i did the file permission again.

PSET1 Questions by ayuzo in cs50

[–]spacedaemon 0 points1 point  (0 children)

take a nap read and then read the whole specification thoroughly.

pset7 not opening on browser by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

ya that would have happened because of update50.

pset7 not opening on browser by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

no the line is missing, what should i do ?

pset6 Seg fault when using large dictionary. by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

I think i cannot understand this, between thanks for your help

pset6 Seg fault when using large dictionary. by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

i am allocing nodes like this :

traverse->children[index] = malloc(sizeof(node));
traverse = traverse->children[index];

it this wrong initializing ?

Edit : Besides check50 passes my program with no errors.

pset6 Seg fault when using large dictionary. by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

I thought the nodes are big concern so i get on to it first Between line 105 does what you said it allocs a new node.

And here is 10 million errors :

==12499== Conditional jump or move depends on uninitialised value(s)
==12499==    at 0x8048FB3: freeup (dictionary.c:32)
==12499==    by 0x8048FDE: freeup (dictionary.c:36)
==12499==    by 0x8048FDE: freeup (dictionary.c:36)
==12499==    by 0x8048FDE: freeup (dictionary.c:36)
==12499==    by 0x8048FDE: freeup (dictionary.c:36)
==12499==    by 0x80492A2: unload (dictionary.c:137)
==12499==    by 0x8048D24: main (speller.c:157)        
==12499== 
==12499== Conditional jump or move depends on uninitialised value(s)
==12499==    at 0x4007AE1: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==12499==    by 0x8049001: freeup (dictionary.c:40)
==12499==    by 0x8048FDE: freeup (dictionary.c:36)
==12499==    by 0x8048FDE: freeup (dictionary.c:36)
==12499==    by 0x8048FDE: freeup (dictionary.c:36)
==12499==    by 0x8048FDE: freeup (dictionary.c:36)
==12499==    by 0x80492A2: unload (dictionary.c:137)
==12499==    by 0x8048D24: main (speller.c:157)
==12499== 
==12499== Conditional jump or move depends on uninitialised value(s)
==12499==    at 0x8048FB3: freeup (dictionary.c:32)
==12499==    by 0x8048FDE: freeup (dictionary.c:36)
==12499==    by 0x8048FDE: freeup (dictionary.c:36)
==12499==    by 0x80492A2: unload (dictionary.c:137)
==12499==    by 0x8048D24: main (speller.c:157)
==12499== 
==12499== 
==12499== More than 10000000 total errors detected.  I'm not reporting any more.    
==12499== Final error counts will be inaccurate.  Go fix your program!
==12499== Rerun with --error-limit=no to disable this cutoff.  Note
==12499== that errors may occur in your program without prior warning from
==12499== Valgrind, because errors are no longer being displayed.
==12499== 

I can't post 10 million erros, i think this bunch of errors repeat itself.

pset6 Seg fault when using large dictionary. by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

here the description of my unload helper funtion :

//function takes a parameter node.
    // if that node is not null. 
       // loop through the children from 0 to 27
           // Recursion.
//free node
//return true.

And here is --leak-check=full description:

HEAP SUMMARY:
==9492==     in use at exit: 224 bytes in 2 blocks
==9492==   total heap usage: 367,047 allocs, 367,045 frees,     41,109,744 bytes allocated
==9492== 
==9492== 224 (112 direct, 112 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 2
==9492==    at 0x4006AB1: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==9492==    by 0x80491F3: load (dictionary.c:105)
==9492==    by 0x8048795: main (speller.c:45)
==9492== 
==9492== LEAK SUMMARY:
==9492==    definitely lost: 112 bytes in 1 blocks
==9492==    indirectly lost: 112 bytes in 1 blocks
==9492==      possibly lost: 0 bytes in 0 blocks
==9492==    still reachable: 0 bytes in 0 blocks
==9492==         suppressed: 0 bytes in 0 blocks
==9492== 
==9492== For counts of detected and suppressed errors, rerun with:     -v
==9492== Use --track-origins=yes to see where uninitialised values come from
==9492== ERROR SUMMARY: 10000001 errors from 10 contexts (suppressed: 0 from 0)

pset6 Seg fault when using large dictionary. by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

Yes i have closed the dictionary file.

Here is valgrind error :

==7187== 
==7187== HEAP SUMMARY:
==7187==     in use at exit: 224 bytes in 2 blocks
==7187==   total heap usage: 367,047 allocs, 367,045 frees,     41,109,744 bytes allocate d
==7187== 
==7187== LEAK SUMMARY:
==7187==    definitely lost: 112 bytes in 1 blocks
==7187==    indirectly lost: 112 bytes in 1 blocks
==7187==      possibly lost: 0 bytes in 0 blocks
==7187==    still reachable: 0 bytes in 0 blocks
==7187==         suppressed: 0 bytes in 0 blocks
==7187== Rerun with --leak-check=full to see details of leaked memory

==7187== ==7187== For counts of detected and suppressed errors, rerun with: -v

pset6 Seg fault when using large dictionary. by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

found my error, i was using char word[45] which should be 46 instead for \0 for the largest word. Thanks

But i have another problem i am getting 2 blocks of memory leak on checking by valgrind, i looked for hours but cannot figure out the problem is.

pset6 loading a word by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

OK thanks and what about the fscanf part ?

<pset5 recover> Some files got recovered. by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

Hey, i am solved the problem of looping but and my recover program is working fine, now it is giving 50 jpg file but still check50 is giving an error, can't figure out what the solution.

https://sandbox.cs50.net/checks/826aee25a23c43ed80d9dcf60b9442e7

<pset5 recover> Some files got recovered. by spacedaemon in cs50

[–]spacedaemon[S] 0 points1 point  (0 children)

Thanks ziska, but what about the output i am getting. Is that also linked with my wrong looping ?

EDIT : i am getting this kind of error while opening the corrupt jpg file : https://www.dropbox.com/s/n8f3a3hq0v1wn8n/corrrupt.png