Too much powder means your clothes will not rinse properly during the rinse cycle which promotes growth of mold and that bad smell.
Too much powder can also block up your pipes. If the smell persists in the machine while it's empty you might have a blockage in the system. You can try to fix this by running the machine on empty with hot water and a few cups of vinegar. Also check in the lint trapor filter is blocked up with bits.