With this minimal example, containing all information of your post, the error cannot be produced:
So, there may be information missing. I also assume you mean the
thesis class that we can find on CTAN.
Instead of manually adjusting lengths, I strongly recommand to use the
geometry package for that purpose:
You may also specify margins and various other page dimensions using the
key=value option interface. geometry calculates missing dimensions. Otherwise the user has to ensure that text width, left margin, right margin, binding offset and perhaps margin note width all sum up to the correct page width.
geometry autodetects the driver like pdftex or dvips.