Stack Overflow Error with each boot

Each time I reboot, I get a stack overflow error with Value Key 2. And then Avast wants to do a complete scan which takes hours. I usually press escape and the scan is aborted. When I have allowed the scan to finish there have been no errors. How do I clear this up so that I am not having this error?