If something is wrong with your harddrive, your system log should say so (dmesg on Linux). If something is wrong with your memory, then WEIRD THINGS will happen. Even if other programs behaves fine, run a tool like memtest86. Leave it overnight.
This is very good advice. Bad RAM is more common than one should think, and causes all kinds of symptoms. memtest86 will usually find it, in particular if left to run overnight. Usually, it just confirms that the RAM is OK, but then you don't have to worry about that