1

SITUATION

I enrolled in CS50x in late 2014. The class ended on 12/31/2014 and I was not able to finish in time.

Enrolled in CS50x3 in 2015 and re-submitting my completed work where appropriate.

PROBLEM

check50 gives the error below and Gradebook shows a zero for my submission.

jharvard@ubuntu (~/Dropbox/pset5): check50 2014.fall.pset5.speller dictionary.c dictionary.h Makefile
:) dictionary.c, dictionary.h, Makefile exist
:) speller compiles
:( handles most basic words properly
expected output, not standard error of "/opt/sandbox50/bin/run.sh: line 31: 322..."
:( handles min length (1-char) words
expected output, not standard error of "/opt/sandbox50/bin/run.sh: line 31: 322..."
:( handles max length (45-char) words
expected output, not standard error of "/opt/sandbox50/bin/run.sh: line 31: 323..."
:( spell-checking is case-insensitive
expected output, not standard error of "/opt/sandbox50/bin/run.sh: line 31: 323..."
:( handles possessives properly
expected output, not standard error of "/opt/sandbox50/bin/run.sh: line 31: 323..."
:( handles substrings properly
expected output, not standard error of "/opt/sandbox50/bin/run.sh: line 31: 322..."
https://sandbox.cs50.net/checks/c80f89da3ef1452c98b5772cf7042c9a

I can't look at why /opt/sandbox50/bin/run.sh is throwing errors, as this is on the cs50 grading server. The error messages returned by check50 are not helpful in determining the nature of the problem.

I receive the same results as the staff solution, as shown below by the diff between my and their results.

diff --normal student.txt staff.txt

< TIME IN load: 0.04
> TIME IN load: 0.03

< TIME IN unload: 0.04
< TIME IN TOTAL: 0.08

> TIME IN unload: 0.05
> TIME IN TOTAL: 0.09

I manipulated the check50 id line, thinking maybe they're in the process of updating the pset pages, and the new link might be

check50 2015.spring.pset5.speller dictionary.c dictionary.h Makefile

instead of

check50 2014.fall.pset5.speller dictionary.c dictionary.h Makefile

from the pset specification page. Again, no luck.

I downloaded pset5 again to replace my version of speller.c, thinking I might have modified speller, which would violate pset5 specifications. I then compiled and ran the program again. It compiled with no errors and again, results identical to staff solution.

Also, here's my Valgrind output;

==26374== Memcheck, a memory error detector

==26374== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.

==26374== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info

==26374== Command: ./speller /home/cs50/pset5/texts/austinpowers.txt

==26374== Parent PID: 24989

==26374==

==26374== Conditional jump or move depends on uninitialised value(s)

==26374== at 0x8048FEE: load (dictionary.c:97)

==26374== by 0x80486F5: main (speller.c:45)

==26374==

==26374== Conditional jump or move depends on uninitialised value(s)

==26374== at 0x80490B5: check (dictionary.c:123)

==26374== by 0x8048A8D: main (speller.c:117)

==26374==

==26374== Conditional jump or move depends on uninitialised value(s)

==26374== at 0x804910E: check (dictionary.c:130)

==26374== by 0x8048A8D: main (speller.c:117)

==26374==

==26374== Conditional jump or move depends on uninitialised value(s)

==26374== at 0x80491DE: downt (dictionary.c:166)

==26374== by 0x80491A2: unload (dictionary.c:153)

==26374== by 0x8048C84: main (speller.c:157)

==26374==

==26374== Conditional jump or move depends on uninitialised value(s)

==26374== at 0x80491DE: downt (dictionary.c:166)

==26374== by 0x80491F5: downt (dictionary.c:167)

==26374== by 0x80491A2: unload (dictionary.c:153)

==26374== by 0x8048C84: main (speller.c:157)

==26374== ==26374== Conditional jump or move depends on uninitialised value(s)

==26374== at 0x80491DE: downt (dictionary.c:166)

==26374== by 0x80491F5: downt (dictionary.c:167)

==26374== by 0x80491F5: downt (dictionary.c:167)

==26374== by 0x80491A2: unload (dictionary.c:153)

==26374== by 0x8048C84: main (speller.c:157)

==26374==

==26374== Conditional jump or move depends on uninitialised value(s)

==26374== at 0x80491DE: downt (dictionary.c:166)

==26374== by 0x80491F5: downt (dictionary.c:167)

==26374== by 0x80491F5: downt (dictionary.c:167)

==26374== by 0x80491F5: downt (dictionary.c:167)

==26374== by 0x80491A2: unload (dictionary.c:153)

==26374== by 0x8048C84: main (speller.c:157)

==26374==

==26374==

==26374== HEAP SUMMARY:

==26374== in use at exit: 0 bytes in 0 blocks

==26374== total heap usage: 367,084 allocs, 367,084 frees, 41,113,888 bytes allocated

==26374==

==26374== All heap blocks were freed -- no leaks are possible

==26374==

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

==26374== Use --track-origins=yes to see where uninitialised values come from

==26374== ERROR SUMMARY: 9911858 errors from 7 contexts (suppressed: 0 from 0)

enter preformatted text here
0
1

It is very hard to say on the first glance, but have you done the "case sensitivity" portion of the pset? I had a problem there, which caused the same errors in valgrind. Mind you, that it is not so simple to use strcpy or tolower on word in check function.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .