I uninstalled BC2, WinCDEmu, WinPcap, and Physx, and Avast started working again. I don't think they caused the problem though because I reinstalled them and Avast still works. If it stops working again in a few days I'll say something. Thanks for your help.
(By the way, I checked the realtime data when Avast was scanning and it didn't show any shield activity for some reason.)