It is maybe not the avast but not sure.
You can try:
1.Go to the Search tool in your version of Windows, type
sysdm.cpl, and select the program of the same name.
2.Click the Advanced tab.
3.Click the Settings button under Startup and Recovery (as opposed to the dialog box’s other two Settings buttons).
4.Uncheck
Automatically restart.5.You might also want to check Write an event to the system log if it’s not already checked.