Crossed fingers.
However, re-installing any software cannot fix a hardware issue. Your memory sticks must perform as they should, your hdd must pass manufacturer's hdd stress tests, so what looks to be avast! is the cause, cannot be, as if either is failing, then data will be lost in memory or on the hdd. Either way, one ends up with corrupted software due to the errors caused by transient failing hardware.
Check both for errors using the first link provided above: Memtest and your hdd vendor's hdd test software. Check your PSU for proper operation.
Only way to fix these sort of errors is to test and replace, if needed, with known good.
Information is provided for consideration only.