I don’t think this has anything to do wiith Avast as i recently had the same problem but with me it was when my machine started up. With me there was a corrupt system file. Check yours through command prompt.